mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2025-12-25 10:12:38 +01:00
Do not rely on ansible_user (#214)
* Apply "become" on roles instead of plays This leads to facts being gathered for the "regular" login user, instead of root. * Do not rely on ansible_user Instead of reading ansible_user (which may or may not be defined), this patch lets the roles rely on Ansible facts [1]. [1]: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html
This commit is contained in:
10
site.yml
10
site.yml
@@ -2,23 +2,25 @@
|
||||
|
||||
- hosts: k3s_cluster
|
||||
gather_facts: yes
|
||||
become: yes
|
||||
roles:
|
||||
- role: prereq
|
||||
become: true
|
||||
- role: download
|
||||
become: true
|
||||
- role: raspberrypi
|
||||
become: true
|
||||
|
||||
- hosts: master
|
||||
become: yes
|
||||
roles:
|
||||
- role: k3s/master
|
||||
become: true
|
||||
|
||||
- hosts: node
|
||||
become: yes
|
||||
roles:
|
||||
- role: k3s/node
|
||||
become: true
|
||||
|
||||
- hosts: master
|
||||
become: yes
|
||||
roles:
|
||||
- role: k3s/post
|
||||
become: true
|
||||
|
||||
Reference in New Issue
Block a user