Fixed wrong usage of references

This commit is contained in:
Davide Oddone 2024-10-18 02:51:24 +02:00
parent c341b3283a
commit 842c113af4
2 changed files with 6 additions and 8 deletions

View File

@ -230,14 +230,8 @@
become: true become: true
delegate_to: localhost delegate_to: localhost
- name: Generate join command - name: Generate the Join Command
ansible.builtin.command: kubeadm token create --print-join-command ansible.builtin.shell: cat /tmp/kubeadm_output | tail -n 2 | sed ':a;N;$!ba;s/\\\n\s*/ /g' > /tmp/join-command
register: join_command
- name: Copy join command to local file
ansible.builtin.copy:
content: '"{{ join_command.stdout_lines[0] }}"'
dest: '"/tmp/join-command"'
delegate_to: localhost delegate_to: localhost
- name: Set permissions for the Join Executable - name: Set permissions for the Join Executable

View File

@ -11,6 +11,10 @@
state: present state: present
update_cache: true update_cache: true
- name: Set a hostname
ansible.builtin.hostname:
name: worker-{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}
- name: Install Docker - name: Install Docker
ansible.builtin.apt: ansible.builtin.apt:
name: docker.io name: docker.io