forked from ISTI-ansible-roles/ansible-roles
library/roles/ssh-keys/tasks/non-root-ssh-keys.yml: do not try to install ssh keys if they do not exist.
library/roles/tomcat-multiple-instances/handlers/main.yml: Ignore errors.
This commit is contained in:
parent
5e6ddbf01a
commit
f0f94260c5
|
@ -1,13 +1,13 @@
|
||||||
---
|
---
|
||||||
- name: Install the ssh keys for non root users
|
- name: Install the ssh keys for non root users
|
||||||
authorized_key: user={{ item.0.name }} key="{{ item.1 }}" state=present
|
authorized_key: user={{ item.0.name }} key="{{ item.1 }}" state=present
|
||||||
when: non_root_users
|
when:
|
||||||
|
- authorized_keys is defined
|
||||||
|
- non_root_users
|
||||||
with_subelements:
|
with_subelements:
|
||||||
- ssh_users_list
|
- ssh_users_list
|
||||||
- authorized_keys
|
- authorized_keys
|
||||||
tags:
|
tags: [ "pubkeys", "ssh_keys" ]
|
||||||
- pubkeys
|
|
||||||
- ssh_keys
|
|
||||||
|
|
||||||
- name: Remove obsolete ssh keys if there are any
|
- name: Remove obsolete ssh keys if there are any
|
||||||
authorized_key: user={{ item.0.name }} key="{{ item.1 }}" state=absent
|
authorized_key: user={{ item.0.name }} key="{{ item.1 }}" state=absent
|
||||||
|
@ -17,7 +17,4 @@
|
||||||
with_subelements:
|
with_subelements:
|
||||||
- ssh_users_list
|
- ssh_users_list
|
||||||
- authorized_keys
|
- authorized_keys
|
||||||
tags:
|
tags: [ "pubkeys", "ssh_keys" ]
|
||||||
- pubkeys
|
|
||||||
- ssh_keys
|
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,8 @@ tomcat_m_java_gc_opts: "-XX:+UseConcMarkSweepGC"
|
||||||
tomcat_m_other_java_opts: ""
|
tomcat_m_other_java_opts: ""
|
||||||
tomcat_m_webapps_autodeploy: False
|
tomcat_m_webapps_autodeploy: False
|
||||||
tomcat_m_webapps_unpack: False
|
tomcat_m_webapps_unpack: False
|
||||||
|
tomcat_m_start_instances: True
|
||||||
|
tomcat_m_enable_instances: True
|
||||||
|
|
||||||
# JMX and debugging
|
# JMX and debugging
|
||||||
tomcat_m_enable_remote_debugging: False
|
tomcat_m_enable_remote_debugging: False
|
||||||
|
|
|
@ -3,21 +3,26 @@
|
||||||
service: name=tomcat-instance-'{{ item.item.http_port }}' state=restarted sleep=20
|
service: name=tomcat-instance-'{{ item.item.http_port }}' state=restarted sleep=20
|
||||||
with_items: restart_needed.results
|
with_items: restart_needed.results
|
||||||
when: item.changed
|
when: item.changed
|
||||||
|
ignore_errors: True
|
||||||
|
|
||||||
- name: tomcat restart instances with changed jmx config
|
- name: tomcat restart instances with changed jmx config
|
||||||
service: name=tomcat-instance-'{{ item.item.http_port }}' state=restarted sleep=20
|
service: name=tomcat-instance-'{{ item.item.http_port }}' state=restarted sleep=20
|
||||||
with_items: jmx_restart_needed.results
|
with_items: jmx_restart_needed.results
|
||||||
when: item.changed
|
when: item.changed
|
||||||
|
ignore_errors: True
|
||||||
|
|
||||||
- name: tomcat instances restart
|
- name: tomcat instances restart
|
||||||
service: name=tomcat-instance-'{{ item.http_port }}' state=restarted sleep=20
|
service: name=tomcat-instance-'{{ item.http_port }}' state=restarted sleep=20
|
||||||
with_items: tomcat_m_instances
|
with_items: tomcat_m_instances
|
||||||
|
ignore_errors: True
|
||||||
|
|
||||||
- name: enable tomcat instances
|
- name: enable tomcat instances
|
||||||
service: name=tomcat-instance-'{{ item.http_port }}' state=started enabled=yes sleep 20
|
service: name=tomcat-instance-'{{ item.http_port }}' state=started enabled=yes sleep 20
|
||||||
with_items: tomcat_m_instances
|
with_items: tomcat_m_instances
|
||||||
|
ignore_errors: True
|
||||||
|
|
||||||
- name: disable tomcat instances
|
- name: disable tomcat instances
|
||||||
service: name=tomcat-instance-'{{ item.http_port }}' state=stopped enabled=no sleep 20
|
service: name=tomcat-instance-'{{ item.http_port }}' state=stopped enabled=no sleep 20
|
||||||
with_items: tomcat_m_instances
|
with_items: tomcat_m_instances
|
||||||
|
ignore_errors: True
|
||||||
|
|
||||||
|
|
|
@ -166,11 +166,17 @@
|
||||||
- tomcat restart instances with changed jmx config
|
- tomcat restart instances with changed jmx config
|
||||||
tags: [ 'tomcat', 'tomcat_instances', 'tomcat_jmx' ]
|
tags: [ 'tomcat', 'tomcat_instances', 'tomcat_jmx' ]
|
||||||
|
|
||||||
- name: Start and enable all the tomcat instances
|
- name: Start all the tomcat instances
|
||||||
service: name=tomcat-instance-'{{ item.http_port }}' state=started sleep=20 enabled=yes
|
service: name=tomcat-instance-'{{ item.http_port }}' state=started sleep=20
|
||||||
with_items: tomcat_m_instances
|
with_items: tomcat_m_instances
|
||||||
when: tomcat_first_install.changed
|
when:
|
||||||
tags:
|
- tomcat_first_install.changed
|
||||||
- tomcat
|
- tomcat_m_start_instances
|
||||||
- tomcat_instances
|
tags: [ 'tomcat', 'tomcat_instances']
|
||||||
|
ignore_errors: True
|
||||||
|
|
||||||
|
- name: Enable all the tomcat instances
|
||||||
|
service: name=tomcat-instance-'{{ item.http_port }}' enabled=yes
|
||||||
|
with_items: tomcat_m_instances
|
||||||
|
when: tomcat_m_enable_instances
|
||||||
|
tags: [ 'tomcat', 'tomcat_instances']
|
||||||
|
|
Loading…
Reference in New Issue