You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-homelab/playbooks/bootstrap.yml

20 lines
555 B
YAML

# needs to be run with a different user with access to create ansible key and user.
# e.g.
# ansible-playbook bootstrap.yml -e ansible_ssh_user=cianhatton
# might additionally require -K if your user requires password for sudo.
- name: Generate SSH Key for ansible
hosts: localhost
connection: local
tasks:
- name: Generate an OpenSSH rsa keypair for ansible
community.crypto.openssh_keypair:
path: ~/.ssh/ansible
passphrase: ''
- name: Bootstrap Ansible hosts.
hosts: all
become: true
roles:
- role: bootstrap