ADD: AddUser-josef.yaml
This commit is contained in:
parent
37d8c735c1
commit
c827241551
@ -1,4 +1,9 @@
|
||||
[gluster]
|
||||
s00-gl01 ansible_host=192.168.0.21
|
||||
s00-gl02 ansible_host=192.168.0.22
|
||||
s00-gl03 ansible_host=192.168.0.23
|
||||
s00-gl03 ansible_host=192.168.0.23
|
||||
|
||||
[linux]
|
||||
s00-mn01 ansible_host=192.168.0.10
|
||||
s00-mx01 ansible_host=192.168.0.20
|
||||
s00-px01 ansible_host=192.168.0.15
|
21
playbooks/AddUser-josef.yaml
Normal file
21
playbooks/AddUser-josef.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: "ADD NEW USER: josef"
|
||||
hosts: all
|
||||
become: true
|
||||
vars:
|
||||
login: "josef"
|
||||
pubkey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIiQpYsV2PtDi3GVrXcjn/LZYPypgmqucNAz+QMnnBoh josef@josef-X99"
|
||||
shell: "/bin/bash"
|
||||
tasks:
|
||||
- name: "ADD USER"
|
||||
ansible.builtin.user:
|
||||
name: "{{ login }}"
|
||||
comment: "{{ login }}"
|
||||
state: present
|
||||
shell: "{{ shell }}"
|
||||
create_home: true
|
||||
- name: "ADD KEY"
|
||||
ansible.posix.authorized_key:
|
||||
user: "{{ login }}"
|
||||
key: "{{ pubkey }}"
|
||||
state: present
|
Loading…
x
Reference in New Issue
Block a user