From 4901a70b5cede42fd30d36aa7ec9eedb0a790f60 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 3 Aug 2018 18:30:47 +0200 Subject: [PATCH] library/roles/smartgears/smartgears/tasks/install-gcube-keys.yml: Install the keys as root and then change permissions. --- .../smartgears/tasks/install-gcube-keys.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/smartgears/smartgears/tasks/install-gcube-keys.yml b/smartgears/smartgears/tasks/install-gcube-keys.yml index 0e65d18..db3e53d 100644 --- a/smartgears/smartgears/tasks/install-gcube-keys.yml +++ b/smartgears/smartgears/tasks/install-gcube-keys.yml @@ -1,46 +1,46 @@ --- - block: - name: Install the production gcube keys - get_url: url={{ item.url }} dest=/{{ gcube_tomcat_lib_dir }}/{{ item.name }} owner={{ smartgears_user }} group={{ d4science_user }} mode=0600 + get_url: url={{ item.url }} dest={{ gcube_tomcat_lib_dir }}/{{ item.name }} owner={{ smartgears_user }} group={{ d4science_user }} mode=0600 with_items: '{{ gcube_production_security_keys }}' notify: Restart smartgears when: install_gcube_prod_key - name: Remove the production gcube keys - file: dest=/{{ gcube_tomcat_lib_dir }}/{{ item.name }} state=absent + file: dest={{ gcube_tomcat_lib_dir }}/{{ item.name }} state=absent with_items: '{{ gcube_production_security_keys }}' notify: Restart smartgears when: not install_gcube_prod_key - name: Install the devel gcube keys - get_url: url={{ item.url }} dest=/{{ gcube_tomcat_lib_dir }}/{{ item.name }} owner={{ smartgears_user }} group={{ d4science_user }} mode=0600 + get_url: url={{ item.url }} dest={{ gcube_tomcat_lib_dir }}/{{ item.name }} owner={{ smartgears_user }} group={{ d4science_user }} mode=0600 with_items: '{{ gcube_dev_security_keys }}' notify: Restart smartgears when: install_gcube_dev_key - name: Remove the devel gcube keys - file: dest=/{{ gcube_tomcat_lib_dir }}/{{ item.name }} state=absent + file: dest={{ gcube_tomcat_lib_dir }}/{{ item.name }} state=absent with_items: '{{ gcube_dev_security_keys }}' notify: Restart smartgears when: not install_gcube_dev_key - name: Install the preprod gcube keys - get_url: url={{ item.url }} dest=/{{ gcube_tomcat_lib_dir }}/{{ item.name }} owner={{ smartgears_user }} group={{ smartgears_user }} mode=0600 + get_url: url={{ item.url }} dest={{ gcube_tomcat_lib_dir }}/{{ item.name }} owner={{ smartgears_user }} group={{ smartgears_user }} mode=0600 with_items: '{{ gcube_preprod_security_keys }}' notify: Restart smartgears when: install_gcube_preprod_key - name: Remove the preprod gcube keys - file: dest=/{{ gcube_tomcat_lib_dir }}/{{ item.name }} state=absent + file: dest={{ gcube_tomcat_lib_dir }}/{{ item.name }} state=absent with_items: '{{ gcube_preprod_security_keys }}' notify: Restart smartgears when: not install_gcube_preprod_key - name: Remove the obsolete or expired gcube keys - file: dest=/{{ gcube_tomcat_lib_dir }}/{{ item.name }} state=absent + file: dest={{ gcube_tomcat_lib_dir }}/{{ item.name }} state=absent with_items: '{{ gcube_old_security_keys }}' notify: Restart smartgears - become: True - become_user: '{{ smartgears_user }}' + #become: True + #become_user: '{{ smartgears_user }}' tags: gcube_key