53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
---
|
|
|
|
- name: install base packages
|
|
apt: name={{item}} state=installed install_recommends=no
|
|
with_items:
|
|
- python-pip
|
|
- python-dev
|
|
|
|
- name: copy akanda-appliance code
|
|
synchronize: src={{ playbook_dir }}/.. dest=/tmp/akanda-appliance
|
|
|
|
- name: ensure latest setuptools
|
|
pip: name=setuptools state=latest
|
|
|
|
- name: install required files
|
|
pip: requirements=/tmp/akanda-appliance/requirements.txt
|
|
|
|
- name: install akanda-appliance
|
|
command: python setup.py install chdir=/tmp/akanda-appliance
|
|
|
|
- name: install init.d files
|
|
copy: src={{playbook_dir}}/../scripts/etc/init.d/{{item}} dest=/etc/init.d/{{item}} mode=0555
|
|
with_items:
|
|
- metadata
|
|
- akanda-router-api-server
|
|
|
|
- name: update-rc
|
|
command: update-rc.d akanda-router-api-server start
|
|
|
|
- name: add timestamp
|
|
shell: date > arg1 creates=/etc/akanda-release
|
|
|
|
- name: enable forwarding
|
|
sysctl: name={{item}} value=1 sysctl_set=yes state=present reload=yes
|
|
with_items:
|
|
- net.ipv4.ip_forward
|
|
- net.ipv6.conf.all.forwarding
|
|
when: router_appliance
|
|
|
|
- name: remove packages only needed for build
|
|
apt: name={{item}} state=absent
|
|
with_items:
|
|
- python-pip
|
|
- python-dev
|
|
- build-essential
|
|
when: do_cleanup
|
|
|
|
- name: Autoremove unused packages
|
|
command: apt-get -y autoremove
|
|
when: do_cleanup
|
|
|
|
|