diff options
author | Niklas Yann Wettengel <niyawe@niyawe.de> | 2017-03-17 22:35:38 +0100 |
---|---|---|
committer | Niklas Yann Wettengel <niyawe@niyawe.de> | 2017-03-17 22:35:38 +0100 |
commit | 4b97c64f947662cd4e2c233a51114c1ff3a9815c (patch) | |
tree | 07882522000071bfe7ffe7b10e773198bd6b06dd /roles/install_fastd/tasks/main.yml | |
parent | 711f968dda1acca7d6b2a86e28a1535449938941 (diff) |
updated setup_fastd playbook
added features:
- install_bind
- install_dhcp
- install_fastd
- setup_batman
Diffstat (limited to 'roles/install_fastd/tasks/main.yml')
-rw-r--r-- | roles/install_fastd/tasks/main.yml | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/roles/install_fastd/tasks/main.yml b/roles/install_fastd/tasks/main.yml new file mode 100644 index 0000000..3bdd59e --- /dev/null +++ b/roles/install_fastd/tasks/main.yml @@ -0,0 +1,94 @@ +--- +- name: install fastd + become: yes + become_user: '{{ aur_user }}' + aur: + name: fastd + tool: yaourt + +- name: create ffmyk folder + file: + path: /etc/fastd/ffmyk + state: directory + +- name: fastd.conf + template: + src: fastd.conf.j2 + dest: /etc/fastd/ffmyk/fastd.conf + mode: 0640 +- name: create backbone folder + file: + path: /etc/fastd/ffmyk/backbone + state: directory + +- name: add backbone peers + copy: + src: '{{ item }}' + dest: /etc/fastd/ffmyk/backbone/{{ item }} + with_items: + - fastd1 + - fastd2 + - fastd3 + - fastd4 + - fastd5 + - fastd6 + - fastd7 + - fastd8 + - fastd9 + - fastd10 + - fastd11 + - fastd12 + - fastd13 + - fastd14 + - fastd15 + +- name: add fastd bin folder + file: + path: /etc/fastd/ffmyk/bin + state: directory + +- name: add fastd up script + template: + src: fastd_up.sh.j2 + dest: /etc/fastd/ffmyk/bin/up.sh + mode: 0744 + +- name: add fastd peers folder + file: + path: /etc/fastd/ffmyk/peers + state: directory + +- name: install php for api script + pacman: + name: php + state: present + +- name: add fastd peer api script + copy: + src: fastd-api.php + dest: /etc/fastd/ffmyk/bin/fastd-api.php + +- name: install cronie + pacman: + name: cronie + state: present + +- name: start and enable cronie + systemd: + name: cronie.service + enabled: yes + state: started + +- name: setup cronjob for fastd-api + cron: + name: fastd-api + minute: '*/10' + user: root + cron_file: fastd-api + job: '/usr/bin/php /etc/fastd/ffmyk/bin/fastd-api.php' + +- name: start and enable fastd service + systemd: + name: fastd@ffmyk.service + enabled: yes + state: started |