Loading roles/k3s/server/tasks/main.yml +9 −1 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 Loading roles/prereq/tasks/main.yml +10 −1 Original line number Diff line number Diff line Loading @@ -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' Loading @@ -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 Loading
roles/k3s/server/tasks/main.yml +9 −1 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 Loading
roles/prereq/tasks/main.yml +10 −1 Original line number Diff line number Diff line Loading @@ -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' Loading @@ -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