Handle apparmor for Debian 11 when parser not present
Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
parent
bfd030290d
commit
9d918c9da0
|
@ -41,7 +41,7 @@
|
|||
owner: "{{ ansible_user }}"
|
||||
mode: "u=rwx,g=rx,o="
|
||||
|
||||
- name: Pause to allow server startup
|
||||
- name: Pause to allow first server startup
|
||||
when: (groups['server'] | length) > 1
|
||||
ansible.builtin.pause:
|
||||
seconds: 10
|
||||
|
@ -54,6 +54,14 @@
|
|||
owner: "{{ ansible_user }}"
|
||||
mode: "u=rw,g=,o="
|
||||
|
||||
- name: Add K3s autocomplete to user bashrc
|
||||
become: true
|
||||
become_user: "{{ ansible_user }}"
|
||||
ansible.builtin.command:
|
||||
cmd: "k3s completion bash -i"
|
||||
register: out
|
||||
changed_when: out.rc != 0
|
||||
|
||||
- name: Change server to API endpoint instead of localhost
|
||||
ansible.builtin.command: >-
|
||||
/usr/local/bin/k3s kubectl config set-cluster default
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
register: apparmor_status
|
||||
changed_when: false
|
||||
|
||||
- name: Install Apparmor Parser
|
||||
- name: Install Apparmor Parser [Suse]
|
||||
when:
|
||||
- apparmor_status.stdout == "Y"
|
||||
- ansible_os_family == 'Suse'
|
||||
|
@ -137,6 +137,15 @@
|
|||
name: apparmor-parser
|
||||
state: present
|
||||
|
||||
- name: Install Apparmor Parser [Debian]
|
||||
when:
|
||||
- apparmor_status.stdout == "Y"
|
||||
- ansible_distribution == 'Debian'
|
||||
- ansible_facts['distribution_major_version'] == "11"
|
||||
ansible.builtin.package:
|
||||
name: apparmor
|
||||
state: present
|
||||
|
||||
- name: Add /usr/local/bin to sudo secure_path
|
||||
ansible.builtin.lineinfile:
|
||||
line: 'Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin'
|
||||
|
|
Loading…
Reference in New Issue