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