../library/roles/apache: Ignore errors when starting the service for the first time.
../library/roles/nginx: Ignore errors when starting the service for the first time. ../library/roles/postgresql/tasks/manage_pg_db.yml: New 'createdb' variable is used to setup more than one user for the same database.
This commit is contained in:
parent
b249d43010
commit
cb35582624
|
@ -34,9 +34,11 @@
|
|||
- name: Ensure that the apache service is enabled and started
|
||||
service: name=apache2 state=started enabled=yes
|
||||
when: apache_service_enabled
|
||||
ignore_errors: True
|
||||
tags: apache
|
||||
|
||||
- name: Ensure that the apache service is disabled and stopped if we do not want it running
|
||||
service: name=apache2 state=stopped enabled=no
|
||||
when: not apache_service_enabled
|
||||
ignore_errors: True
|
||||
tags: apache
|
||||
|
|
|
@ -3,7 +3,7 @@ nginx_use_ldap_pam_auth: False
|
|||
nginx_pam_svc_name: nginx
|
||||
nginx_ldap_uri: "ldap://ldap.sub.research-infrastructures.eu"
|
||||
nginx_ldap_base_dn: "dc=research-infrastructures,dc=eu"
|
||||
nginx_enabled: "Yes"
|
||||
nginx_enabled: True
|
||||
|
||||
nginx_enable_compression: True
|
||||
nginx_gzip_vary: "on"
|
||||
|
|
|
@ -24,6 +24,14 @@
|
|||
notify: Reload nginx
|
||||
tags: [ 'nginx', 'nginx_conf' ]
|
||||
|
||||
- name: Ensure that the webserver is running
|
||||
service: name=nginx state=started enabled={{ nginx_enabled }}
|
||||
- name: Ensure that the webserver is running and enabled at boot time
|
||||
service: name=nginx state=started enabled=yes
|
||||
when: nginx_enabled
|
||||
ignore_errors: True
|
||||
tags: nginx
|
||||
|
||||
- name: Ensure that the webserver is stopped and disabled
|
||||
service: name=nginx state=stopped enabled=no
|
||||
when: not nginx_enabled
|
||||
ignore_errors: True
|
||||
tags: nginx
|
||||
|
|
|
@ -16,5 +16,5 @@
|
|||
with_items: psql_db_data
|
||||
when:
|
||||
- psql_db_data is defined
|
||||
- item.roles is defined
|
||||
- ( item.createdb is not defined or item.createdb )
|
||||
tags: [ 'postgresql', 'postgres', 'pg_db' ]
|
||||
|
|
Loading…
Reference in New Issue