Switch to shell module
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Danny Bessems 2022-04-20 09:16:55 +02:00
parent 75d1e95238
commit 29f7ebf14a

View File

@ -66,19 +66,22 @@
groups: k3s_ha
with_items: "{{ nodes }}"
# - name: Scan public keys
# ansible.builtin.shell:
# cmd: "ssh-keyscan -t rsa {{ item.ip }}"
# register: publickeys
# with_items: "{{ nodes }}"
- name: Scan public keys
ansible.builtin.shell:
cmd: "ssh-keyscan -t rsa {{ item.ip }}"
register: publickeys
with_items: "{{ nodes }}"
# - name: Store public keys
# ansible.builtin.known_hosts:
# name: "{{ item.item }}"
# key: "{{ item.stdout }}"
# state: present
# path: ~/.ssh/known_hosts
# with_items: "{{ publickeys.results }}"
- ansible.builtin.debug:
var: publickeys
- name: Store public keys
ansible.builtin.known_hosts:
name: "{{ item.item }}"
key: "{{ item.stdout }}"
state: present
path: ~/.ssh/known_hosts
with_items: "{{ publickeys.results }}"
- name: Provision Kubernetes
hosts: k3s_ha