Add git repo deployments
This commit is contained in:
parent
94deb71dab
commit
dd1e9458c5
@ -23,6 +23,7 @@ Role Variables
|
|||||||
* aliases : list of alternative FQDN for the website
|
* aliases : list of alternative FQDN for the website
|
||||||
* proxy : URL to direct traffic for the FQDN to, e.g. http://localhost:8080
|
* proxy : URL to direct traffic for the FQDN to, e.g. http://localhost:8080
|
||||||
* redirect : Where should we send traffic?
|
* redirect : Where should we send traffic?
|
||||||
|
* repo : git URL of website repo to clone/update
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
lets_encrypt_admin: 'acme@example.com'
|
lets_encrypt_admin: 'acme@example.com'
|
||||||
|
@ -133,6 +133,7 @@
|
|||||||
- ensure_apache is defined
|
- ensure_apache is defined
|
||||||
- http_vhost is defined
|
- http_vhost is defined
|
||||||
- http_vhost is iterable
|
- http_vhost is iterable
|
||||||
|
- item.fqdn is defined
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: '/srv/http/{{ item.fqdn }}'
|
path: '/srv/http/{{ item.fqdn }}'
|
||||||
state: 'directory'
|
state: 'directory'
|
||||||
@ -140,6 +141,20 @@
|
|||||||
loop: '{{ http_vhost }}'
|
loop: '{{ http_vhost }}'
|
||||||
loop_control:
|
loop_control:
|
||||||
label: '/srv/http/{{ item.fqdn }} will be ensured'
|
label: '/srv/http/{{ item.fqdn }} will be ensured'
|
||||||
|
- name: 'ensure website content from git repos'
|
||||||
|
when:
|
||||||
|
- ansible_system == 'Linux'
|
||||||
|
- ensure_apache is defined
|
||||||
|
- http_vhost is defined
|
||||||
|
- http_vhost is iterable
|
||||||
|
- item.fqdn is defined
|
||||||
|
- item.repo is defined
|
||||||
|
ansible.builtin.git:
|
||||||
|
dest: '/srv/http/{{ item.fqdn }}'
|
||||||
|
repo: '{{ item.repo }}'
|
||||||
|
loop: '{{ http_vhost }}'
|
||||||
|
loop_control:
|
||||||
|
label: '/srv/http/{{ item.fqdn }} will be populated...'
|
||||||
- name: 'ensure services'
|
- name: 'ensure services'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_system == 'Linux'
|
||||||
@ -158,4 +173,3 @@
|
|||||||
- 'ensure_apache.service_facts'
|
- 'ensure_apache.service_facts'
|
||||||
- name: 'flush handlers'
|
- name: 'flush handlers'
|
||||||
meta: 'flush_handlers'
|
meta: 'flush_handlers'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user