Skip to content

Commit

Permalink
feat(account): Add SSD folder if defined
Browse files Browse the repository at this point in the history
  • Loading branch information
lafeychine committed Oct 22, 2023
1 parent 749cf02 commit f3ddf80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions roles/accounts/tasks/account.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
loop_control:
loop_var: file

- name: Initialise {{ ssd }}/{{ user }} folder
file:
path: "{{ ssd }}/{{ user }}"
state: directory
group: "{{ user }}"
owner: "{{ user }}"
when: "service and ssd is defined"

- name: Copy SSH key of user {{ user }}
authorized_key:
user: "{{ user }}"
Expand Down
1 change: 1 addition & 0 deletions roles/accounts/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- name: Set accounts
include_tasks: account.yml
vars:
service: "{{ item.value.service | default(false) }}"
uid: "{{ item.value.uid | default(omit) }}"
user: "{{ item.user }}"
workspace: "{{ '/data/project' if item.value.service | default(false) else '/home' }}"
Expand Down

0 comments on commit f3ddf80

Please sign in to comment.