doas, fix to current lint standards.

This commit is contained in:
me
2026-10-02 11:11:13 -07:00
parent 6178c56838
commit d272730ced
+8 -5
View File
@@ -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 }}"