Privilege escalation to solve "Access denied"

```
FAILED! => {"attempts": 3, "changed": false, "msg": "Unable to enable service k3s: Failed to enable unit: Access denied\n"}
```

The task never sets become to true, hence failing due to lack of permissions on the user that is executing it by default.
This commit is contained in:
Michael 2020-05-30 23:40:05 +02:00 committed by GitHub
parent 848a5457ff
commit f90cc5ca18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,6 +32,7 @@
retries: "{{ play_hosts | length }}" retries: "{{ play_hosts | length }}"
delay: 2 delay: 2
when: k3s_control_node and not k3s_primary_control_node when: k3s_control_node and not k3s_primary_control_node
become: "{{ k3s_become_for_systemd | ternary(true, false, k3s_become_for_all) }}"
- name: Wait for control plane to be ready to accept connections - name: Wait for control plane to be ready to accept connections
wait_for: wait_for: