CJ_Clippy 325fe576e2
Some checks failed
ci / test (push) Failing after 6m3s
fp/our CI/CD / build (push) Successful in 1m27s
add ipfs playbook
2025-10-04 08:45:34 -08:00

36 lines
1.2 KiB
YAML

---
## @warning Do not edit this file! It's probably right, and you're probably doing something wrong!
## If you're seeing interactive host auth checks prompts while running ansible-playbook,
## you're probably skipping over this role! Don't skip it!
## @see https://gist.github.com/shirou/6928012
## @todo known_hosts.py has a `add_host_key` function. Could we use that instead of this shell script?
- name: Scan for SSH host keys.
delegate_to: localhost
ansible.builtin.shell:
cmd: ssh-keyscan -p 22 {{ ansible_host }} 2>/dev/null
changed_when: false
register: bootstrap_ssh_scan
retries: 2 # it always fails the first time
until: bootstrap_ssh_scan.rc == 0
- name: Debug bootstrap_ssh_scan variable
ansible.builtin.debug:
var: bootstrap_ssh_scan
- name: Update known_hosts.
ansible.builtin.known_hosts:
key: "{{ item }}"
name: "{{ ansible_host }}"
with_items: "{{ bootstrap_ssh_scan.stdout_lines }}"
delegate_to: localhost
- name: Install python3
become: true
ansible.builtin.raw: >
test -e /usr/bin/python3 || (test -e /usr/bin/apt-get && (apt-get -y update && apt-get install -y python3))
args:
creates: /usr/bin/python3