variable username
This commit is contained in:
1
inv.yml
1
inv.yml
@@ -5,6 +5,7 @@ all:
|
||||
ansible_host: ed-c7-1.virt.magni.thoto.net
|
||||
ssh_args: -o ControlMaster=auto -o ControlPersist=60s
|
||||
# ansible_host: 192.168.122.139
|
||||
unpriv_user: thoto
|
||||
children:
|
||||
htcondor:
|
||||
hosts:
|
||||
|
@@ -2,14 +2,14 @@
|
||||
file:
|
||||
path: "/container/docker-images/htcondor"
|
||||
state: directory
|
||||
owner: thoto
|
||||
owner: "{{unpriv_user}}"
|
||||
group: docker
|
||||
mode: "u=rwx,g=rwx,o=rx"
|
||||
|
||||
- copy:
|
||||
dest: "/container/docker-images/htcondor/Dockerfile"
|
||||
src: "htcondor.Dockerfile"
|
||||
owner: thoto
|
||||
owner: "{{unpriv_user}}"
|
||||
group: docker
|
||||
register: cp_dockerfile
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
copy:
|
||||
src: "conf/{{item}}/"
|
||||
dest: "/container/volumes/{{item}}/"
|
||||
owner: thoto
|
||||
owner: "{{unpriv_user}}"
|
||||
group: docker
|
||||
mode: "u=rwx,g=rwx"
|
||||
with_items: [ "cm", "exec", "sub", "common"]
|
||||
|
@@ -51,6 +51,6 @@
|
||||
|
||||
- name: "fix user privileges to run docker"
|
||||
user:
|
||||
name: thoto
|
||||
name: "{{unpriv_user}}"
|
||||
groups: docker
|
||||
append: True
|
||||
|
@@ -1,13 +1,13 @@
|
||||
- file:
|
||||
path: "/container/docker-images/{{item}}"
|
||||
state: directory
|
||||
owner: thoto
|
||||
owner: "{{unpriv_user}}"
|
||||
group: docker
|
||||
|
||||
- copy:
|
||||
src: "{{item}}.Dockerfile"
|
||||
dest: "/container/docker-images/{{item}}/Dockerfile"
|
||||
owner: thoto
|
||||
owner: "{{unpriv_user}}"
|
||||
group: docker
|
||||
register: slurm_cp_dockerfile
|
||||
|
||||
|
@@ -62,7 +62,7 @@
|
||||
- machine: submit1
|
||||
image: slurm-slurmd
|
||||
extra_mounts:
|
||||
- "/home/thoto/job3/:/mnt/:rw"
|
||||
- "/home/{{unpriv_user}}/job3/:/mnt/:rw"
|
||||
tags: [ slurm-config ]
|
||||
|
||||
# TODO: reserve some address using docker_network_info and assign as aux
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
- name: "enable user thoto for fakeroot access"
|
||||
lineinfile:
|
||||
line: "thoto:4294836224:65536"
|
||||
line: "{{unpriv_user}}:4294836224:65536"
|
||||
dest: "{{item}}"
|
||||
with_items: ["/etc/subuid", "/etc/subgid"]
|
||||
# the task above idempotentially does the same as:
|
||||
|
Reference in New Issue
Block a user