Skip to content

Commit

Permalink
fix xdg issue (#289)
Browse files Browse the repository at this point in the history
* fix xdg issue

* fix

* fix

* sudo rights

Co-authored-by: Fotios Papadopoulos <[email protected]>
  • Loading branch information
ToivoS and Fotios Papadopoulos authored Oct 16, 2020
1 parent b6015f5 commit 141249c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ansible/roles/products/common/docker-container/tasks/reinstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
path: "{{ shadow_hand_launcher_folder }}"
state: directory

- name: Check if /run/user/1000 folder exists in the docker image
shell: "docker image history --no-trunc {{ full_image_name }} | grep XDG_RUNTIME_DIR | wc -l"
register: xdg_check
changed_when: false

- name: Creating the container which will execute setup script in terminator when started
when: "not nvidia_docker|bool and terminator and setup_script | length > 0"
include_tasks: create-container/with-setup-with-terminator.yml
Expand All @@ -24,6 +29,13 @@
when: "nvidia_docker|bool and terminator and setup_script | length > 0"
include_tasks: create-container/nvidia-with-setup-with-terminator.yml

- name: if run/user/1000 doesn't exist, then create it inside the container
import_tasks: modify-container.yml
vars:
modify_script_name: "create_run_user_1000.sh"
modify_script_commands: "sudo mkdir -p /run/user/1000;sudo chmod 0700 /run/user/1000;sudo chown 1000:1000 /run/user/1000;export XDG_RUNTIME_DIR=/run/user/1000"
when: xdg_check.stdout=="0"

- name: Checking out PRs and branches if pr_branches list has been specified
block:
- name: Creating the pull_pr_branches_and_catkin_make bash script for testing for these branches {{ pr_branches }}
Expand Down

0 comments on commit 141249c

Please sign in to comment.