ajout code gestion NDM - testé avec succes
This commit is contained in:
@@ -12,6 +12,7 @@ Role Variables
|
|||||||
--------------
|
--------------
|
||||||
|
|
||||||
apache_server_name
|
apache_server_name
|
||||||
|
apache_server_ip
|
||||||
apache_ssl_root_email: email to use for certificate
|
apache_ssl_root_email: email to use for certificate
|
||||||
apache_server_alias (list)
|
apache_server_alias (list)
|
||||||
apache_user_password: default undefined
|
apache_user_password: default undefined
|
||||||
@@ -21,6 +22,7 @@ apache_access_log: {{ apache_base_dir}}/logs/access_log
|
|||||||
apache_php_socket: {{ apache_base_dir }}/php-fpm.sock
|
apache_php_socket: {{ apache_base_dir }}/php-fpm.sock
|
||||||
apache_use_php: true
|
apache_use_php: true
|
||||||
apache_use_ssl: true
|
apache_use_ssl: true
|
||||||
|
apache_use_dns: true - wether we setup up dns A and CNAME records
|
||||||
apache_use_zabbix: true - wether we install script to monitor certificate expiry date
|
apache_use_zabbix: true - wether we install script to monitor certificate expiry date
|
||||||
apache_use_certbot: true
|
apache_use_certbot: true
|
||||||
apache_use_stats: true
|
apache_use_stats: true
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ apache_ssl_certificate: "/etc/letsencrypt/live/{{ apache_server_name }}/cert.pem
|
|||||||
apache_ssl_chain: "/etc/letsencrypt/live/{{ apache_server_name }}/fullchain.pem"
|
apache_ssl_chain: "/etc/letsencrypt/live/{{ apache_server_name }}/fullchain.pem"
|
||||||
apache_ssl_key: "/etc/letsencrypt/live/{{ apache_server_name }}/privkey.pem "
|
apache_ssl_key: "/etc/letsencrypt/live/{{ apache_server_name }}/privkey.pem "
|
||||||
apache_use_certbot: true
|
apache_use_certbot: true
|
||||||
|
apache_use_dns: true
|
||||||
apache_use_php: true
|
apache_use_php: true
|
||||||
apache_use_ssl: true
|
apache_use_ssl: true
|
||||||
apache_use_stats: true
|
apache_use_stats: true
|
||||||
|
|||||||
26
tasks/dns.yml
Normal file
26
tasks/dns.yml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
- name: setup dns names
|
||||||
|
block:
|
||||||
|
- name: create ovh DNS A record
|
||||||
|
ovh_dns:
|
||||||
|
domain: opendoor.fr
|
||||||
|
name: "{{ apache_server_name }}"
|
||||||
|
type: A
|
||||||
|
value: "{{ apache_server_ip }}"
|
||||||
|
|
||||||
|
- name: create ovh DNS CNAME
|
||||||
|
ovh_dns:
|
||||||
|
domain: opendoor.fr
|
||||||
|
name: "{{ item }}"
|
||||||
|
type: CNAME
|
||||||
|
value: "{{ apache_server_name }}"
|
||||||
|
loop:
|
||||||
|
"{{ apache_server_alias }}"
|
||||||
|
when: apache_server_alias is defined
|
||||||
|
delegate_to: localhost
|
||||||
|
become: false
|
||||||
|
environment:
|
||||||
|
OVH_ENDPOINT: ovh-eu
|
||||||
|
OVH_APPLICATION_KEY: "{{ lookup( 'keepass', 'opendoor/ovh_application_key', 'password' ) }}"
|
||||||
|
OVH_APPLICATION_SECRET: "{{ lookup( 'keepass', 'opendoor/ovh_application_secret', 'password' ) }}"
|
||||||
|
OVH_CONSUMER_KEY: "{{ lookup( 'keepass', 'opendoor/ovh_consumer_key', 'password' ) }}"
|
||||||
@@ -44,6 +44,10 @@
|
|||||||
- "{{ apache_base_dir }}/session"
|
- "{{ apache_base_dir }}/session"
|
||||||
- "{{ apache_base_dir }}/wsdlcache"
|
- "{{ apache_base_dir }}/wsdlcache"
|
||||||
|
|
||||||
|
- name: dns setup
|
||||||
|
include_tasks: dns.yml
|
||||||
|
when: apache_use_dns is defined
|
||||||
|
|
||||||
- name: generate cert
|
- name: generate cert
|
||||||
import_tasks: certbot.yml
|
import_tasks: certbot.yml
|
||||||
when: apache_use_certbot
|
when: apache_use_certbot
|
||||||
|
|||||||
Reference in New Issue
Block a user