Compare commits

...

1 Commits

Author SHA1 Message Date
aa0fe4d039 variable username 2021-04-27 15:00:12 +02:00
6 changed files with 9 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ all:
ansible_host: ed-c7-1.virt.magni.thoto.net ansible_host: ed-c7-1.virt.magni.thoto.net
ssh_args: -o ControlMaster=auto -o ControlPersist=60s ssh_args: -o ControlMaster=auto -o ControlPersist=60s
# ansible_host: 192.168.122.139 # ansible_host: 192.168.122.139
unpriv_user: thoto
children: children:
htcondor: htcondor:
hosts: hosts:

View File

@@ -2,14 +2,14 @@
file: file:
path: "/container/docker-images/htcondor" path: "/container/docker-images/htcondor"
state: directory state: directory
owner: thoto owner: "{{unpriv_user}}"
group: docker group: docker
mode: "u=rwx,g=rwx,o=rx" mode: "u=rwx,g=rwx,o=rx"
- copy: - copy:
dest: "/container/docker-images/htcondor/Dockerfile" dest: "/container/docker-images/htcondor/Dockerfile"
src: "htcondor.Dockerfile" src: "htcondor.Dockerfile"
owner: thoto owner: "{{unpriv_user}}"
group: docker group: docker
register: cp_dockerfile register: cp_dockerfile
@@ -26,7 +26,7 @@
copy: copy:
src: "conf/{{item}}/" src: "conf/{{item}}/"
dest: "/container/volumes/{{item}}/" dest: "/container/volumes/{{item}}/"
owner: thoto owner: "{{unpriv_user}}"
group: docker group: docker
mode: "u=rwx,g=rwx" mode: "u=rwx,g=rwx"
with_items: [ "cm", "exec", "sub", "common"] with_items: [ "cm", "exec", "sub", "common"]

View File

@@ -51,6 +51,6 @@
- name: "fix user privileges to run docker" - name: "fix user privileges to run docker"
user: user:
name: thoto name: "{{unpriv_user}}"
groups: docker groups: docker
append: True append: True

View File

@@ -1,13 +1,13 @@
- file: - file:
path: "/container/docker-images/{{item}}" path: "/container/docker-images/{{item}}"
state: directory state: directory
owner: thoto owner: "{{unpriv_user}}"
group: docker group: docker
- copy: - copy:
src: "{{item}}.Dockerfile" src: "{{item}}.Dockerfile"
dest: "/container/docker-images/{{item}}/Dockerfile" dest: "/container/docker-images/{{item}}/Dockerfile"
owner: thoto owner: "{{unpriv_user}}"
group: docker group: docker
register: slurm_cp_dockerfile register: slurm_cp_dockerfile

View File

@@ -62,7 +62,7 @@
- machine: submit1 - machine: submit1
image: slurm-slurmd image: slurm-slurmd
extra_mounts: extra_mounts:
- "/home/thoto/job3/:/mnt/:rw" - "/home/{{unpriv_user}}/job3/:/mnt/:rw"
tags: [ slurm-config ] tags: [ slurm-config ]
# TODO: reserve some address using docker_network_info and assign as aux # TODO: reserve some address using docker_network_info and assign as aux

View File

@@ -10,7 +10,7 @@
- name: "enable user thoto for fakeroot access" - name: "enable user thoto for fakeroot access"
lineinfile: lineinfile:
line: "thoto:4294836224:65536" line: "{{unpriv_user}}:4294836224:65536"
dest: "{{item}}" dest: "{{item}}"
with_items: ["/etc/subuid", "/etc/subgid"] with_items: ["/etc/subuid", "/etc/subgid"]
# the task above idempotentially does the same as: # the task above idempotentially does the same as: