From 7a248878dee96f15adbba94e5189d7591520d8f7 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Tue, 27 Sep 2016 15:32:39 +0200 Subject: [PATCH] library/roles/d4s_user_services_perms: Various fixes. --- d4s_user_services_perms/tasks/d4s-service-node.yml | 4 ++-- d4s_user_services_perms/tasks/d4s-smartgears-node.yml | 8 ++++---- d4s_user_services_perms/tasks/d4s-tomcat-node.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/d4s_user_services_perms/tasks/d4s-service-node.yml b/d4s_user_services_perms/tasks/d4s-service-node.yml index acb8045..78aec0a 100644 --- a/d4s_user_services_perms/tasks/d4s-service-node.yml +++ b/d4s_user_services_perms/tasks/d4s-service-node.yml @@ -3,11 +3,11 @@ - name: Install the README file that explains where the options files are placed and how start/stop the service template: src={{ item }}-service.j2 dest={{ d4science_user_home }}/{{ item }} mode=0444 with_items: - - 'README-service' + - 'README' - name: Install the script that allows the d4science user to start and stop the service without using the full path template: src={{ item }}.j2 dest=/home/{{ d4science_user }}/{{ item }} owner={{ d4science_user }} group={{ d4science_user }} mode=0755 - with _items: '{{ d4science_user_service_scripts }}' + with_items: '{{ d4science_user_service_scripts }}' - name: Install the sudoers config that permits the tomcat user to restart the service become: False diff --git a/d4s_user_services_perms/tasks/d4s-smartgears-node.yml b/d4s_user_services_perms/tasks/d4s-smartgears-node.yml index 53055ec..1b2ffa9 100644 --- a/d4s_user_services_perms/tasks/d4s-smartgears-node.yml +++ b/d4s_user_services_perms/tasks/d4s-smartgears-node.yml @@ -6,14 +6,14 @@ - name: Install the script that allows the tomcat user to start and stop the service without using the full path template: src={{ item.1 }}.j2 dest={{ item.0.user_home }}/{{ item.1 }} owner={{ item.0.user }} group={{ item.0.user }} mode=0755 with_nested: - - '{{ tomcat_m_instances }}' + - '{{ tomcat_m_instances | default([]) }}' - [ 'startContainer.sh', 'stopContainer.sh' ] tags: [ 'tomcat', 'd4science', 'sudo' ] - name: Install the README file that explains where the options files are placed and how start/stop the service template: src={{ item.1 }}.j2 dest={{ item.0.user_home }}/{{ item.1 }} owner={{ item.0.user }} group={{ item.0.user }} mode=0444 with_nested: - - '{{ tomcat_m_instances }}' + - '{{ tomcat_m_instances | default([]) }}' - [ 'README' ] tags: [ 'tomcat', 'd4science', 'd4s_readme' ] @@ -26,12 +26,12 @@ - name: Set the read/write permissions on the tomcat default options files acl: name=/etc/default/tomcat-instance-{{ item.http_port }} entity={{ item.user }} etype=user permissions=rw state=present - with_items: '{{ tomcat_m_instances }}' + with_items: '{{ tomcat_m_instances | default([]) }}' tags: [ 'tomcat', 'd4science', 'acl' ] - name: Set the read/write permissions on the tomcat default local options files acl: name=/etc/default/tomcat-instance-{{ item.http_port }}.local entity={{ item.user }} etype=user permissions=rw state=present - with_items: '{{ tomcat_m_instances }}' + with_items: '{{ tomcat_m_instances | default([]) }}' tags: [ 'tomcat', 'd4science', 'acl' ] ignore_errors: True diff --git a/d4s_user_services_perms/tasks/d4s-tomcat-node.yml b/d4s_user_services_perms/tasks/d4s-tomcat-node.yml index 17a7a56..87503fc 100644 --- a/d4s_user_services_perms/tasks/d4s-tomcat-node.yml +++ b/d4s_user_services_perms/tasks/d4s-tomcat-node.yml @@ -10,7 +10,7 @@ - name: Install the README file that explains where the options files are placed and how start/stop the service template: src={{ item.1 }}.j2 dest={{ item.0.user_home }}/{{ item.1 }} owner={{ item.0.user }} group={{ item.0.user }} mode=0444 with_nested: - - '{{ tomcat_m_instances }}' + - '{{ tomcat_m_instances | default([]) }}' - [ 'README-tomcat' ] when: tomcat_m_instances is defined tags: [ 'tomcat', 'd4science', 'd4s_readme' ]