forked from ISTI-ansible-roles/ansible-roles
../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
|
- name: Ensure that the apache service is enabled and started
|
||||||
service: name=apache2 state=started enabled=yes
|
service: name=apache2 state=started enabled=yes
|
||||||
when: apache_service_enabled
|
when: apache_service_enabled
|
||||||
|
ignore_errors: True
|
||||||
tags: apache
|
tags: apache
|
||||||
|
|
||||||
- name: Ensure that the apache service is disabled and stopped if we do not want it running
|
- name: Ensure that the apache service is disabled and stopped if we do not want it running
|
||||||
service: name=apache2 state=stopped enabled=no
|
service: name=apache2 state=stopped enabled=no
|
||||||
when: not apache_service_enabled
|
when: not apache_service_enabled
|
||||||
|
ignore_errors: True
|
||||||
tags: apache
|
tags: apache
|
||||||
|
|
|
@ -3,7 +3,7 @@ nginx_use_ldap_pam_auth: False
|
||||||
nginx_pam_svc_name: nginx
|
nginx_pam_svc_name: nginx
|
||||||
nginx_ldap_uri: "ldap://ldap.sub.research-infrastructures.eu"
|
nginx_ldap_uri: "ldap://ldap.sub.research-infrastructures.eu"
|
||||||
nginx_ldap_base_dn: "dc=research-infrastructures,dc=eu"
|
nginx_ldap_base_dn: "dc=research-infrastructures,dc=eu"
|
||||||
nginx_enabled: "Yes"
|
nginx_enabled: True
|
||||||
|
|
||||||
nginx_enable_compression: True
|
nginx_enable_compression: True
|
||||||
nginx_gzip_vary: "on"
|
nginx_gzip_vary: "on"
|
||||||
|
|
|
@ -24,6 +24,14 @@
|
||||||
notify: Reload nginx
|
notify: Reload nginx
|
||||||
tags: [ 'nginx', 'nginx_conf' ]
|
tags: [ 'nginx', 'nginx_conf' ]
|
||||||
|
|
||||||
- name: Ensure that the webserver is running
|
- name: Ensure that the webserver is running and enabled at boot time
|
||||||
service: name=nginx state=started enabled={{ nginx_enabled }}
|
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
|
tags: nginx
|
||||||
|
|
|
@ -16,5 +16,5 @@
|
||||||
with_items: psql_db_data
|
with_items: psql_db_data
|
||||||
when:
|
when:
|
||||||
- psql_db_data is defined
|
- psql_db_data is defined
|
||||||
- item.roles is defined
|
- ( item.createdb is not defined or item.createdb )
|
||||||
tags: [ 'postgresql', 'postgres', 'pg_db' ]
|
tags: [ 'postgresql', 'postgres', 'pg_db' ]
|
||||||
|
|
Loading…
Reference in New Issue