42 lines
1 KiB
YAML
42 lines
1 KiB
YAML
---
|
|
|
|
- name: "Ensure /opt/scripts/ exists"
|
|
ansible.builtin.file:
|
|
path: /opt/scripts
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: "Create directory (/etc/sudoers.d)"
|
|
ansible.builtin.file:
|
|
path: /etc/sudoers.d
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
|
|
- name: "Sudoers (/etc/sudoers.d/97-update.conf)"
|
|
ansible.builtin.template:
|
|
src: ../files/97-update.conf
|
|
dest: /etc/sudoers.d/97-update-conf
|
|
owner: root
|
|
group: root
|
|
mode: '0440'
|
|
when: ansible_os_family != 'OpenBSD' # sudo Installation must be fixed first for OpenBSD
|
|
|
|
- name: "Template Update Script"
|
|
ansible.builtin.template:
|
|
src: ../templates/update.sh.j2
|
|
dest: /opt/scripts/update.sh
|
|
owner: root
|
|
group: root
|
|
mode: u+rwx
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
- name: "Template Update Script"
|
|
ansible.builtin.template:
|
|
src: ../templates/update.sh.j2
|
|
dest: /opt/scripts/update.sh
|
|
owner: root
|
|
group: wheel
|
|
mode: u+rwx
|
|
when: ansible_os_family == 'FreeBSD' or ansible_os_family == 'OpenBSD'
|