This commit is contained in:
parent
4a8a154a01
commit
75d1e95238
24
playbook.yml
24
playbook.yml
@ -66,19 +66,19 @@
|
|||||||
groups: k3s_ha
|
groups: k3s_ha
|
||||||
with_items: "{{ nodes }}"
|
with_items: "{{ nodes }}"
|
||||||
|
|
||||||
- name: Scan public keys
|
# - name: Scan public keys
|
||||||
ansible.builtin.command:
|
# ansible.builtin.shell:
|
||||||
cmd: "ssh-keyscan -t rsa {{ item.ip }} | grep ^[^#]"
|
# cmd: "ssh-keyscan -t rsa {{ item.ip }}"
|
||||||
register: publickeys
|
# register: publickeys
|
||||||
with_items: "{{ nodes }}"
|
# with_items: "{{ nodes }}"
|
||||||
|
|
||||||
- name: Store public keys
|
# - name: Store public keys
|
||||||
ansible.builtin.known_hosts:
|
# ansible.builtin.known_hosts:
|
||||||
name: "{{ item.item }}"
|
# name: "{{ item.item }}"
|
||||||
key: "{{ item.stdout }}"
|
# key: "{{ item.stdout }}"
|
||||||
state: present
|
# state: present
|
||||||
path: ~/.ssh/known_hosts
|
# path: ~/.ssh/known_hosts
|
||||||
with_items: "{{ publickeys.results }}"
|
# with_items: "{{ publickeys.results }}"
|
||||||
|
|
||||||
- name: Provision Kubernetes
|
- name: Provision Kubernetes
|
||||||
hosts: k3s_ha
|
hosts: k3s_ha
|
||||||
|
Loading…
Reference in New Issue
Block a user