Skip to content
Snippets Groups Projects
Commit db03f174 authored by Aleksandr Didenko's avatar Aleksandr Didenko
Browse files

Set defaults for ansible_ssh_user

When setting permission for containers download/upload dir we're
using `ansible_ssh_user`. But if playbook is executed without
user being explicitly set `ansible_ssh_user` may be undefined.
In such situations dir ownership will default to `ansible_user_id`

Closes: #644
parent d3a4d8dc
Branches
Tags
No related merge requests found
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
download_delegate: "{% if download_localhost %}localhost{% else %}{{groups['kube-master'][0]}}{% endif %}" download_delegate: "{% if download_localhost %}localhost{% else %}{{groups['kube-master'][0]}}{% endif %}"
- name: Create dest directory for saved/loaded container images - name: Create dest directory for saved/loaded container images
file: path="{{local_release_dir}}/containers" state=directory recurse=yes mode=0755 owner={{ansible_ssh_user}} file: path="{{local_release_dir}}/containers" state=directory recurse=yes mode=0755 owner={{ansible_ssh_user|default(ansible_user_id)}}
when: "{{ download.enabled|bool and download.container|bool }}" when: "{{ download.enabled|bool and download.container|bool }}"
# This is required for the download_localhost delegate to work smooth with CoreOS cluster nodes # This is required for the download_localhost delegate to work smooth with CoreOS cluster nodes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment