Create vhosts, users, and document roots
This commit is contained in:
@@ -114,6 +114,33 @@
|
||||
loop: '{{ ensure_apache.firewall_list }}'
|
||||
loop_control:
|
||||
label: '{{ item.service }} will be {{ item.state }}'
|
||||
- name: 'ensure users'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ensure_apache is defined
|
||||
- http_vhost is defined
|
||||
- http_vhost is iterable
|
||||
ansible.builtin.user:
|
||||
name: '{{ item.fqdn }}'
|
||||
loop: '{{ http_vhost }}'
|
||||
loop_control:
|
||||
label: '{{ item.fqdn }} will be ensured'
|
||||
- name: 'ensure vhost document roots'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ensure_apache is defined
|
||||
- http_vhost is defined
|
||||
- http_vhost is iterable
|
||||
ansible.builtin.file:
|
||||
group: '{{ item.fqdn }}'
|
||||
owner: '{{ item.fqdn }}'
|
||||
mode: '2775'
|
||||
path: '/srv/http/{{ item.fqdn }}'
|
||||
state: 'directory'
|
||||
setype: 'httpd_sys_content_t'
|
||||
loop: '{{ http_vhost }}'
|
||||
loop_control:
|
||||
label: '/srv/http/{{ item.fqdn }} will be ensured'
|
||||
- name: 'ensure services'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
|
Reference in New Issue
Block a user