variable username

This commit is contained in:
2021-04-27 15:00:12 +02:00
parent d25c2f7a15
commit aa0fe4d039
6 changed files with 9 additions and 8 deletions
+1
View File
@@ -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:
+3 -3
View File
@@ -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"]
+1 -1
View File
@@ -51,6 +51,6 @@
- name: "fix user privileges to run docker"
user:
name: thoto
name: "{{unpriv_user}}"
groups: docker
append: True
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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: