-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaigpu.yaml
66 lines (58 loc) · 1.77 KB
/
aigpu.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
- hosts: aigpu
become: true
become_method: sudo
remote_user: alf
gather_facts: false
vars:
# Define your username and password here that you want to create on target hosts.
rusername: rembjo
ruserpass: ZxFr322A2op
dusername: danand
duserpass: zmF97c0tT3G
ausername: alfkla
auserpass: tVm61aKJ3hw
super_group: sudo
tasks:
- name: Create User rembjo
ansible.builtin.user:
name: "{{ rusername }}"
state: present
shell: /bin/bash
password: "{{ ruserpass | password_hash('sha512') }}"
update_password: on_create
groups: "{{ super_group }}"
append: yes
- name: Deploy SSH Public Key
ansible.posix.authorized_key:
user: "{{ rusername }}"
state: present
key: "{{ lookup('file', '/home/alf/rembjo_id_rsa.pub') }}"
- name: Create User da
ansible.builtin.user:
name: "{{ dusername }}"
state: present
shell: /bin/bash
password: "{{ duserpass | password_hash('sha512') }}"
update_password: on_create
groups: "{{ super_group }}"
append: yes
- name: Deploy SSH Public Key
ansible.posix.authorized_key:
user: "{{ dusername }}"
state: present
key: "{{ lookup('file', '/home/alf/da_id_rsa.pub') }}"
- name: Create User alfkla
ansible.builtin.user:
name: "{{ ausername }}"
state: present
shell: /bin/bash
password: "{{ auserpass | password_hash('sha512') }}"
update_password: on_create
groups: "{{ super_group }}"
append: yes
- name: Deploy SSH Public Key
ansible.posix.authorized_key:
user: "{{ ausername }}"
state: present
key: "{{ lookup('file', '/home/alf/alfkla_id_rsa.pub') }}"