diff options
author | Michael Gugino <mgugino@redhat.com> | 2018-01-03 15:10:26 -0500 |
---|---|---|
committer | Michael Gugino <mgugino@redhat.com> | 2018-01-05 14:53:44 -0500 |
commit | 7923eb92c86a128504436ba0708c96b655de5269 (patch) | |
tree | d0f405d10e670fb14e64122b3c6036e6ba32cc1d /roles/openshift_hosted_templates | |
parent | edde1f2bf0fa180fc69d905ce2aa27e68f7295dd (diff) | |
download | openshift-7923eb92c86a128504436ba0708c96b655de5269.tar.gz openshift-7923eb92c86a128504436ba0708c96b655de5269.tar.bz2 openshift-7923eb92c86a128504436ba0708c96b655de5269.tar.xz openshift-7923eb92c86a128504436ba0708c96b655de5269.zip |
Remove become=no from various roles and tasks
etcd runs some actions locally to copy certs from the
CA cert host. This commit ensures that we respect
the end user's intended behavior with become
when using 'anisble_become' in the inventory.
Other roles with similar tasks have been modified
in the same manner.
We shouldn't hard-code become behavior as it can be
unexpected for the end user.
This only currently works in the CI because the CI
passes the '-b' argument on the command line, which
will override the task behavior.
Diffstat (limited to 'roles/openshift_hosted_templates')
-rw-r--r-- | roles/openshift_hosted_templates/tasks/main.yml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/roles/openshift_hosted_templates/tasks/main.yml b/roles/openshift_hosted_templates/tasks/main.yml index b2313c297..672d25b4d 100644 --- a/roles/openshift_hosted_templates/tasks/main.yml +++ b/roles/openshift_hosted_templates/tasks/main.yml @@ -1,20 +1,25 @@ --- - name: Create local temp dir for OpenShift hosted templates copy local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX - become: False register: copy_hosted_templates_mktemp run_once: True # AUDIT:changed_when: not set here because this task actually # creates something +- name: Create local temp dir for OpenShift examples copy + local_action: command chmod 755 "{{ copy_hosted_templates_mktemp.stdout }}" + run_once: True + - name: Create tar of OpenShift examples local_action: command tar -C "{{ role_path }}/files/{{ content_version }}/{{ hosted_deployment_type }}" -cvf "{{ copy_hosted_templates_mktemp.stdout }}/openshift-hosted-templates.tar" . args: # Disables the following warning: # Consider using unarchive module rather than running tar warn: no - become: False - register: copy_hosted_templates_tar + +- name: Create local temp dir for OpenShift examples copy + local_action: command chmod 744 "{{ copy_hosted_templates_mktemp.stdout }}/openshift-hosted-templates.tar" + run_once: True - name: Create remote OpenShift hosted templates directory file: @@ -28,7 +33,6 @@ dest: "{{ hosted_base }}/" - name: Cleanup the OpenShift hosted templates temp dir - become: False local_action: file dest="{{ copy_hosted_templates_mktemp.stdout }}" state=absent - name: Modify registry paths if registry_url is not registry.access.redhat.com |