diff options
author | Scott Dodson <sdodson@redhat.com> | 2015-09-17 15:56:44 -0400 |
---|---|---|
committer | Scott Dodson <sdodson@redhat.com> | 2015-10-12 15:39:25 -0400 |
commit | ed4f46169befecbbcbd646b5333d77add80e133f (patch) | |
tree | 2cbfc28482fbbcbd1e28959ff055bf8ab83e3268 /roles | |
parent | ee97dd9be30d3d818cf4b8e86ace6e34ae5405ca (diff) | |
download | openshift-ed4f46169befecbbcbd646b5333d77add80e133f.tar.gz openshift-ed4f46169befecbbcbd646b5333d77add80e133f.tar.bz2 openshift-ed4f46169befecbbcbd646b5333d77add80e133f.tar.xz openshift-ed4f46169befecbbcbd646b5333d77add80e133f.zip |
Lookup ansible_ssh_user group for kubeconfig perms
Fixes #585
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_master/tasks/main.yml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index b57711b58..29b56656f 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -167,13 +167,17 @@ shell: echo {{ openshift_master_cluster_password | quote }} | passwd --stdin hacluster when: install_result | changed +- name: Lookup default group for ansible_ssh_user + command: "/usr/bin/id -g {{ ansible_ssh_user }}" + register: _ansible_ssh_user_gid + - name: Create the client config dir(s) file: path: "~{{ item }}/.kube" state: directory mode: 0700 owner: "{{ item }}" - group: "{{ item }}" + group: "{{ 'root' if item == 'root' else _ansible_ssh_user_gid.stdout }}" with_items: - root - "{{ ansible_ssh_user }}" @@ -194,7 +198,7 @@ state: file mode: 0700 owner: "{{ item }}" - group: "{{ item }}" + group: "{{ 'root' if item == 'root' else _ansible_ssh_user_gid.stdout }}" with_items: - root - "{{ ansible_ssh_user }}" |