diff --git a/roles/service-bird-icvpn/handlers/main.yml b/roles/service-bird-icvpn/handlers/main.yml index af1a036..7dd9273 100644 --- a/roles/service-bird-icvpn/handlers/main.yml +++ b/roles/service-bird-icvpn/handlers/main.yml @@ -8,17 +8,3 @@ systemd: name: bird6 state: reloaded - -- name: set file attrs 4 - file: - path: /etc/bird/icvpn_ipv4_peers.conf - mode: 0640 - owner: bird - group: bird - -- name: set file attrs 6 - file: - path: /etc/bird/icvpn_ipv6_peers.conf - mode: 0640 - owner: bird - group: bird diff --git a/roles/service-bird-icvpn/tasks/main.yml b/roles/service-bird-icvpn/tasks/main.yml index c9dfd6b..4d99db1 100644 --- a/roles/service-bird-icvpn/tasks/main.yml +++ b/roles/service-bird-icvpn/tasks/main.yml @@ -6,7 +6,6 @@ creates: /etc/bird/icvpn_ipv{{ item }}_peers.conf notify: - reload bird{{ item }} - - set file attrs {{ item }} with_items: - 4 - 6 @@ -18,7 +17,6 @@ creates: /etc/bird/icvpn_ipv{{ item.key }}_roa.conf notify: - reload bird{{ item.key }} - - set file attrs {{ item.key }} with_dict: 4: max_prefix: 20 @@ -36,3 +34,27 @@ with_items: - 4 - 6 + +- name: set file attributes for ipv4 roa and peer config + file: + path: "{{ item }}" + mode: 0640 + owner: bird + group: bird + notify: + - reload bird4 + with_items: + - /etc/bird/icvpn_ipv4_peers.conf + - /etc/bird/icvpn_ipv4_roa.conf + +- name: set file attributes for ipv6 roa and peer config + file: + path: "{{ item }}" + mode: 0640 + owner: bird + group: bird + notify: + - reload bird6 + with_items: + - /etc/bird/icvpn_ipv6_peers.conf + - /etc/bird/icvpn_ipv6_roa.conf