diff --git a/tasks/general/acct_mgmt/doas.yml b/tasks/general/acct_mgmt/doas.yml index 3ff2115..ce2aa4d 100644 --- a/tasks/general/acct_mgmt/doas.yml +++ b/tasks/general/acct_mgmt/doas.yml @@ -2,7 +2,7 @@ # Install and configure doas. - name: General | Software | DoAs | Facts - set_fact: + ansible.builtin.set_fact: doas_config: | permit persist :wheel as root permit persist :admin as root @@ -11,14 +11,14 @@ doas_conf_file_bsd: /usr/local/etc/doas.conf - name: General | Software | DoAs | Install - package: + ansible.builtin.package: name: - doas register: doas_install ignore_errors: true - name: General | Software | DoAs | Configure [Linux] - blockinfile: + ansible.builtin.blockinfile: path: "{{ doas_conf_file_linux }}" block: | {{ doas_config }} @@ -26,10 +26,11 @@ state: present create: true backup: true + mode: "644" when: not doas_install.failed and ansible_system in ("Linux") - name: General | Software | DoAs | Configure [BSD] - blockinfile: + ansible.builtin.blockinfile: path: "{{ doas_conf_file_linux }}" block: | {{ doas_config }} @@ -37,10 +38,11 @@ state: present create: true backup: true + mode: "644" when: not doas_install.failed and ansible_system in ("FreeBSD") - name: General | Software | DoAs | Configure [Other] - blockinfile: + ansible.builtin.blockinfile: path: "{{ item }}" block: | {{ doas_config }} @@ -48,6 +50,7 @@ state: present create: true backup: true + mode: "644" loop: - "{{ doas_conf_file_linux }}" - "{{ doas_conf_file_bsd }}"