Skip to content

Commit

Permalink
Setting up new users and deploy playbook.
Browse files Browse the repository at this point in the history
Added medwards and ldionne.
  • Loading branch information
Mike Edwards committed Jul 10, 2021
1 parent ecbeeaa commit 8b85bc5
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions configs/libcxx-ansible/files/ldionne_llvm.key.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICeYRGFqAu7pxQUcHDxLDSKPGFYK0R3P6TmcUUn5YuRe [email protected]
1 change: 1 addition & 0 deletions configs/libcxx-ansible/files/medwards_llvm.key.pub
Original file line number Diff line number Diff line change
@@ -0,0 +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 number Diff line number Diff line change
@@ -0,0 +1,8 @@
$ANSIBLE_VAULT;1.1;AES256
38313630636464623262613832303137316333636137656432653130343266666138626538666463
6230666663633065643262373466663237356538356565620a353436656533666465336164613064
62663163343335353535663938343431643039613765336164656131323833313437363961633630
6636626436323138350a313530303536613037633636303435633831333535336331656262303332
36386566336335373965346361316666396263396362313564323537336430636636343166313433
35613865663162373365646337316238613961366230396135633238616366373665363963346465
383734363066313134393264373631613663
12 changes: 12 additions & 0 deletions configs/libcxx-ansible/playbooks/playbook_libcxx_deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- hosts: all
gather_facts: yes
roles:
- role: roles/hardware_facts
tasks:
- include_tasks: "../tasks/add_users.yaml"
with_items:
- { username: medwards, uid: 501 }
- { username: ldionne, uid: 502 }
loop_control:
loop_var: user_dict
28 changes: 28 additions & 0 deletions configs/libcxx-ansible/tasks/add_users.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
- name: "Add the user '{{ user_dict.username }}' with a specific uid and a primary group of 'admin'"
become: yes
user:
name: "{{ user_dict.username }}"
comment: "{{ user_dict.username }} (LLVM Foundation)"
group: admin
shell: /bin/zsh
state: present
remove: no
password: "{{ vault_default_user_password }}"
update_password: on_create
- name: "Create /Users/{{ user_dict.username }}/.ssh dir"
become: yes
ansible.builtin.file:
path: "/Users/{{ user_dict.username }}/.ssh"
state: directory
owner: "{{ user_dict.username }}"
group: staff
mode: '0700'
- name: "Setup {{ user_dict.username }} public key"
become: yes
ansible.builtin.copy:
src: "../files/{{ user_dict.username }}_llvm.key.pub"
dest: "/Users/{{ user_dict.username }}/.ssh/authorized_keys"
owner: "{{ user_dict.username }}"
group: staff
mode: '0644'

0 comments on commit 8b85bc5

Please sign in to comment.