ADD: AddUser-josef.yaml
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user