updated inventory and started setup_key playbook
This commit is contained in:
parent
a6802413e5
commit
7ff34396c7
@ -7,6 +7,8 @@ doc ansible_user=pollen
|
|||||||
[local]
|
[local]
|
||||||
proxmox ansible_user=root
|
proxmox ansible_user=root
|
||||||
pihole ansible_user=pollen
|
pihole ansible_user=pollen
|
||||||
|
bastion ansible_user=mango
|
||||||
|
debianV ansible_user=ansible
|
||||||
|
|
||||||
[windows]
|
[windows]
|
||||||
bane ansible_user=ansible ansible_connection=winrm ansible_winrm_transport=basic ansible_port=5985 ansible_winrm_server_cert_validation=ignore
|
bane ansible_user=ansible ansible_connection=winrm ansible_winrm_transport=basic ansible_port=5985 ansible_winrm_server_cert_validation=ignore
|
||||||
|
18
playbooks/setup_keys.yml
Normal file
18
playbooks/setup_keys.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
- name: Sets up access to managed nodes on the control node
|
||||||
|
hosts: all
|
||||||
|
become: yes
|
||||||
|
gather_facts: true
|
||||||
|
tasks:
|
||||||
|
- name: create ansible user on managed nodes
|
||||||
|
ansible.builtin.user:
|
||||||
|
name: ansible
|
||||||
|
shell: /bin/bash
|
||||||
|
groups: sudo
|
||||||
|
append: yes
|
||||||
|
|
||||||
|
- name: set authorized key for ansible user
|
||||||
|
ansible.posix.authorized_key:
|
||||||
|
user: ansible
|
||||||
|
state: present
|
||||||
|
key: "{{ lookup('file', lookup('env', 'HOME') + '/.ssh/id_rsa.pub') }}"
|
Loading…
Reference in New Issue
Block a user