Ansible/setup/user_setup.yml

15 lines
356 B
YAML
Raw Normal View History

2021-10-16 16:29:06 +00:00
---
- name: Setup ansible configuration for new host
hosts: all
tasks:
- name: Add 'ansible' system user and setup SSH key
become: yes
user:
name: ansible
comment: Automation user for ansible
system: True
create_home: False
generate_ssh_key: yes
ssh_key_bits: 4096
ssh_key_file: /etc/ansible/.id_rsa