Skip to content

Commit 8b85bc5

Browse files
author
Mike Edwards
committed
Setting up new users and deploy playbook.
Added medwards and ldionne.
1 parent ecbeeaa commit 8b85bc5

File tree

5 files changed

+50
-0
lines changed

5 files changed

+50
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICeYRGFqAu7pxQUcHDxLDSKPGFYK0R3P6TmcUUn5YuRe [email protected]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDk1Cbx+lyBzTPxtOCvOckswHLJ+rNbaWXRzpyqSL2m/d5g8zR0PqF5kk8b9+jFq32Ge7A8vcw8cFmtzVP4hPkB6OrhboFRrBDPfIzbrFWaMNRUC9fJAELczuJMFKxUI6srIC7bWhpkxG/vbzLC8EUotWcXbjfFg5VP2LagRDM31SGw98g28TzizBvYgI8PYEcKmxF+4iY7lG+SWZFTV3p/a2PNyIwHi20OhXZfmlnvPsPtx7thvviQumu4S3CDWR3OhPiSQudNAEwSQ+11tuwkx6M1n4F3RfHtXowIAN0guDRprzopL5i+ue2RK3KclWGWlTliUKSo9kQHhLzRztjebFL/jkBBTraYMJZ5RYqUvE2UX4OJbzI6GL4DudCIpW02A3y3vFHaes8VyxqQMJbmmdbX4wNcVi4F+CDl+8vCVHOGOIUrzl8+zW/Pcp04eYSeca4RHe3/4HJtnA0olaHKeyIaB/xZiQ2oqc1UhV1K5KUDMCIzFXaTLYAF1BpbgpyxYfHUGKDy2zUL6fwvV/NkT6m+UM2QMR6DW6wOpwvawKdFy1bebmYSBHZrWgciKHHudaj3rifuN1seJz04n7xMOALgdpH5PoLm4XugK7ce1fwpwmidm1du1YAQNkxUp7uzGCQmk2zyoLBJX+0NIZYw67uJ50/R/XLpp9SySteMRQ==
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
$ANSIBLE_VAULT;1.1;AES256
2+
38313630636464623262613832303137316333636137656432653130343266666138626538666463
3+
6230666663633065643262373466663237356538356565620a353436656533666465336164613064
4+
62663163343335353535663938343431643039613765336164656131323833313437363961633630
5+
6636626436323138350a313530303536613037633636303435633831333535336331656262303332
6+
36386566336335373965346361316666396263396362313564323537336430636636343166313433
7+
35613865663162373365646337316238613961366230396135633238616366373665363963346465
8+
383734363066313134393264373631613663
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
- hosts: all
3+
gather_facts: yes
4+
roles:
5+
- role: roles/hardware_facts
6+
tasks:
7+
- include_tasks: "../tasks/add_users.yaml"
8+
with_items:
9+
- { username: medwards, uid: 501 }
10+
- { username: ldionne, uid: 502 }
11+
loop_control:
12+
loop_var: user_dict
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
- name: "Add the user '{{ user_dict.username }}' with a specific uid and a primary group of 'admin'"
3+
become: yes
4+
user:
5+
name: "{{ user_dict.username }}"
6+
comment: "{{ user_dict.username }} (LLVM Foundation)"
7+
group: admin
8+
shell: /bin/zsh
9+
state: present
10+
remove: no
11+
password: "{{ vault_default_user_password }}"
12+
update_password: on_create
13+
- name: "Create /Users/{{ user_dict.username }}/.ssh dir"
14+
become: yes
15+
ansible.builtin.file:
16+
path: "/Users/{{ user_dict.username }}/.ssh"
17+
state: directory
18+
owner: "{{ user_dict.username }}"
19+
group: staff
20+
mode: '0700'
21+
- name: "Setup {{ user_dict.username }} public key"
22+
become: yes
23+
ansible.builtin.copy:
24+
src: "../files/{{ user_dict.username }}_llvm.key.pub"
25+
dest: "/Users/{{ user_dict.username }}/.ssh/authorized_keys"
26+
owner: "{{ user_dict.username }}"
27+
group: staff
28+
mode: '0644'

0 commit comments

Comments
 (0)