123456789101112131415161718192021222324252627282930313233343536 |
- ---
- - name: Ensure permission on fastd directory
- become: true
- file:
- path: /etc/fastd
- state: directory
- mode: 0700
- - name: Create configuration directories
- become: true
- file:
- dest: "/etc/fastd/{{ item.name }}"
- state: directory
- mode: 0700
- when: item.type == "fastd"
- loop: "{{ peers | flatten(levels=1) }}"
- - name: Install fastd configuration
- become: true
- template:
- src: templates/config.j2
- dest: "/etc/fastd/{{ item.name }}/fastd.conf"
- mode: 0644
- when: item.type == "fastd"
- loop: "{{ peers | flatten(levels=1) }}"
- - name: Enable fastd interfaces for autostart
- become: true
- systemd:
- name: "fastd@{{ item.name }}"
- masked: false
- enabled: true
- state: restarted
- when: item.type == "fastd"
- loop: "{{ peers | flatten(levels=1) }}"
|