You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ffmyk-ansible/roles/install_fastd/tasks/main.yml

62 lines
1.3 KiB
YAML

---
- name: install fastd
pacman:
name: fastd
state: present
7 years ago
- name: create site folder
file:
7 years ago
path: /etc/fastd/ff{{ item.name }}
state: directory
7 years ago
with_items: "{{ sites }}"
- name: fastd.conf
template:
src: fastd.conf.j2
7 years ago
dest: /etc/fastd/ff{{ item.name }}/fastd.conf
mode: 0640
7 years ago
notify: restart fastd{{ item.name }}
with_items: "{{ sites }}"
- name: add fastd bin folder
file:
7 years ago
path: /etc/fastd/ff{{ item.name }}/bin
state: directory
7 years ago
with_items: "{{ sites }}"
- name: add fastd up script
template:
src: fastd_up.sh.j2
7 years ago
dest: /etc/fastd/ff{{ item.name }}/bin/up.sh
mode: 0744
7 years ago
notify: restart fastd{{ item.name }}
with_items: "{{ sites }}"
- name: add fastd verify script
copy:
src: verify.sh
dest: /etc/fastd/ff{{ item.name }}/bin/verify.sh
mode: 0744
7 years ago
with_items: "{{ sites }}"
- name: add fastd_grep script
copy:
src: fastd_grep.sh
dest: /root/fastd_grep.sh
mode: 0744
- name: install fastd_grep dependencies
pacman:
name:
- openbsd-netcat
- jq
state: present
- name: start and enable fastd service
systemd:
7 years ago
name: fastd@ff{{ item.name }}.service
enabled: yes
state: started
7 years ago
with_items: "{{ sites }}"