xoxys.pve/tasks/main.yml
Robert Kaussow 75767ce7e0
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/notify Pipeline was successful
chore: always remove motd from pam
2024-09-29 22:33:22 +02:00

57 lines
1.4 KiB
YAML

---
- name: Ensure mountpoints are present
ansible.builtin.file:
path: "{{ item.path }}"
recurse: True
state: directory
loop: "{{ pve_disk_mount }}"
loop_control:
label: "{{ item.path }}"
- name: Add diskmounts to fstab
ansible.posix.mount:
path: "{{ item.path }}"
src: "{{ item.src }}"
fstype: "{{ item.fstype }}"
opts: "{{ item.opts | default(omit) }}"
state: "{{ item.state | default('mounted') }}"
loop: "{{ pve_disk_mount }}"
loop_control:
label: "{{ item.src }} {{ item.path }}"
- name: Remove motd from pam
community.general.pamd:
name: "{{ item.name }}"
type: "{{ item.type }}"
control: "{{ item.control }}"
module_path: "{{ item.path }}"
state: absent
loop:
- name: "login"
type: "session"
control: "optional"
path: "pam_motd.so"
- name: "sshd"
type: "session"
control: "optional"
path: "pam_motd.so"
- name: Create tmp folder for pve
ansible.builtin.file:
path: "{{ __pve_tmp_dir }}"
recurse: True
state: directory
- name: Configure auth provider
ansible.builtin.template:
src: etc/pve/domains.cfg.j2
dest: "{{ __pve_tmp_dir }}/domains.cfg"
owner: root
group: www-data
mode: "0640"
register: __pve_domains_copy
- name: Copy auth provider to pve filesystem
ansible.builtin.command: "/bin/cp -rf {{ __pve_tmp_dir }}/domains.cfg {{ __pve_base_dir }}/domains.cfg"
changed_when: __pve_domains_copy.changed