-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from lafeychine/master
feat: Extract user account from common
- Loading branch information
Showing
10 changed files
with
238 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- name: default configuration | ||
hosts: all | ||
gather_facts: no | ||
become: yes | ||
roles: | ||
- accounts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
become: yes | ||
roles: | ||
- common | ||
- accounts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
--- | ||
accounts__users: | ||
cquest: | ||
uid: 1202 | ||
admin: true | ||
|
||
jocelyn: | ||
uid: 1203 | ||
admin: true | ||
|
||
marc_marc: | ||
uid: 1216 | ||
admin: true | ||
|
||
achetta: | ||
uid: 1236 | ||
|
||
apavie: | ||
uid: 1211 | ||
|
||
cgiquello: | ||
uid: 1212 | ||
|
||
cormoran: | ||
uid: 1219 | ||
|
||
davidbgk: | ||
uid: 1251 | ||
|
||
don-vip: | ||
uid: 1247 | ||
|
||
driss: | ||
uid: 1224 | ||
|
||
etienne: | ||
uid: 1213 | ||
|
||
eloks: | ||
uid: 1214 | ||
|
||
famlam: | ||
uid: 1250 | ||
|
||
flacombe: | ||
uid: 1246 | ||
|
||
francois2: | ||
uid: 1221 | ||
|
||
fred: | ||
uid: 1205 | ||
|
||
gileri: | ||
uid: 1311 | ||
|
||
guillaumeamat: | ||
uid: 1235 | ||
|
||
gpelloux: | ||
uid: 1237 | ||
|
||
hamlet: | ||
uid: 1305 | ||
|
||
jacques: | ||
uid: 1306 | ||
|
||
jben: | ||
uid: 1206 | ||
|
||
jgcailton: | ||
uid: 1207 | ||
|
||
juliep: | ||
uid: 1210 | ||
|
||
karl: | ||
uid: 1238 | ||
|
||
lcombe: | ||
uid: 1215 | ||
|
||
ljbouere: | ||
uid: 1248 | ||
|
||
mael: | ||
uid: 1218 | ||
|
||
nlehuby: | ||
uid: 1220 | ||
|
||
nmoyroud: | ||
uid: 1226 | ||
|
||
panieravide: | ||
uid: 1230 | ||
|
||
phyks: | ||
uid: 1233 | ||
|
||
pyrog: | ||
uid: 1333 | ||
|
||
redfox: | ||
uid: 1209 | ||
|
||
rodolphe: | ||
uid: 1208 | ||
|
||
rvoirin: | ||
uid: 1308 | ||
|
||
sly: | ||
uid: 1209 | ||
|
||
stephanec: | ||
uid: 1225 | ||
|
||
teslix: | ||
uid: 1222 | ||
|
||
thomasg77: | ||
uid: 1249 | ||
|
||
thomasl: | ||
uid: 1210 | ||
|
||
thorieux: | ||
uid: 1229 | ||
|
||
thrrp: | ||
uid: 1310 | ||
|
||
tykayn: | ||
uid: 1312 | ||
|
||
tyndare: | ||
uid: 1212 | ||
|
||
vdct: | ||
uid: 1217 | ||
|
||
ybon: | ||
uid: 1223 | ||
|
||
ydel: | ||
uid: 1313 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
accounts__users: {} | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[color] | ||
diff = auto | ||
status = auto | ||
branch = auto | ||
[alias] | ||
st = status | ||
ci = commit | ||
br = branch | ||
cp = cherry-pick | ||
logf = log --follow | ||
[log] | ||
decorate = short | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
colorscheme elflord | ||
syn on | ||
set ruler | ||
set noai | ||
set title | ||
|
||
set is " incremental search | ||
set hlsearch | ||
|
||
set foldlevel=500 | ||
|
||
" Pour se souvenir de la dernière position dans le fichier | ||
autocmd BufReadPost * | ||
\ if line("'\"") > 0 && line("'\"") <= line("$") | | ||
\ exe "normal g`\"" | | ||
\ endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
- name: Set {{ user }} group | ||
group: | ||
name: "{{ user }}" | ||
|
||
- name: Set {{ user }} account | ||
user: | ||
group: "{{ user }}" | ||
home: "/home/{{ user }}/" | ||
name: "{{ user }}" | ||
uid: "{{ uid }}" | ||
|
||
- name: Initialise /data/work/ folder for {{ user }} | ||
file: | ||
path: /data/work/{{ user }} | ||
state: directory | ||
group: "{{ user }}" | ||
owner: "{{ user }}" | ||
|
||
- name: Copy SSH key of user {{ user }} | ||
authorized_key: | ||
user: "{{ user }}" | ||
key: "{{ lookup('file', file) }}" | ||
with_fileglob: | ||
- "public_keys/{{ user }}*" | ||
loop_control: | ||
loop_var: file | ||
|
||
- name: Copy default config files | ||
copy: | ||
force: false | ||
src: "default{{ file }}" | ||
dest: "/home/{{ user }}/{{ file }}" | ||
group: "{{ user }}" | ||
owner: "{{ user }}" | ||
loop: | ||
- .gitconfig | ||
- .vimrc | ||
loop_control: | ||
loop_var: file | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
- name: Set accounts | ||
include_tasks: account.yml | ||
vars: | ||
user: "{{ item.user }}" | ||
uid: "{{ item.value.uid }}" | ||
loop: "{{ accounts__users | dict2items(key_name = 'user') }}" | ||
when: "item.user in group_names or (item.value.admin | default(false))" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.