Role tweaks (#268)

* Limited boolean values to true/false;

Signed-off-by: Jon S. Stumpf <jon.stumpf@gmail.com>

* Moved ArchLinux prereq task to be a handler;

Signed-off-by: Jon S. Stumpf <jon.stumpf@gmail.com>

* Standardized task name for adding cgroup support;

Signed-off-by: Jon S. Stumpf <jon.stumpf@gmail.com>

* Have backrefs: follow path:;

Signed-off-by: Jon S. Stumpf <jon.stumpf@gmail.com>

* Addressed ansible-lint errors;

Signed-off-by: Jon S. Stumpf <jon.stumpf@gmail.com>

* Fixed #264, task 7: Copy K3s service file;

Signed-off-by: Jon S. Stumpf <jon.stumpf@gmail.com>

---------

Signed-off-by: Jon S. Stumpf <jon.stumpf@gmail.com>
This commit is contained in:
Jon S. Stumpf
2023-12-04 12:46:45 -05:00
committed by GitHub
parent b4237ef24d
commit 4d6e60281e
9 changed files with 29 additions and 24 deletions

View File

@@ -21,16 +21,17 @@
changed_when: true
- name: Copy K3s service file
register: k3s_agent_service
ansible.builtin.template:
src: "k3s-agent.service.j2"
dest: "{{ systemd_dir }}/k3s-agent.service"
owner: root
group: root
mode: 0755
mode: "u=rw,g=r,o=r"
- name: Enable and check K3s service
ansible.builtin.systemd:
name: k3s-agent
daemon_reload: true
state: started
daemon_reload: "{{ true if k3s_agent_service.changed else false }}"
state: "{{ 'restarted' if k3s_agent_service.changed else 'started' }}"
enabled: true