Merge branch 'master' of github.com:tconstans/ansible_apache_vhost
This commit is contained in:
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 }}/wsdlcache"
|
||||
|
||||
- name: dns setup
|
||||
include_tasks: dns.yml
|
||||
when: apache_use_dns is defined
|
||||
|
||||
- name: generate cert
|
||||
import_tasks: certbot.yml
|
||||
when: apache_use_certbot
|
||||
|
||||
Reference in New Issue
Block a user