From 4b97c64f947662cd4e2c233a51114c1ff3a9815c Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Fri, 17 Mar 2017 22:35:38 +0100 Subject: updated setup_fastd playbook added features: - install_bind - install_dhcp - install_fastd - setup_batman --- roles/install_fastd/tasks/main.yml | 94 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 roles/install_fastd/tasks/main.yml (limited to 'roles/install_fastd/tasks/main.yml') 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 -- cgit v1.2.3-54-g00ecf