Skip to content

Commit

Permalink
Add an option to create docroot.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Dec 8, 2021
1 parent fb1259f commit 4f18122
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
# - name: proxy-initial-not-pooled
# - name: proxy-sendchunks
# value: 1
# - name: no_doc_root
# servername: nodocroot.example.com
# documentroot: /var/www/html/nodocroot
# create_docroot: no
httpd_directories:
- name: my_directory
path: "{{ httpd_data_directory }}/my_directory"
Expand Down
12 changes: 12 additions & 0 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@
when:
- httpd_vhosts is defined

- name: test if item.create_docroot in httpd_vhosts is set correctly
ansible.builtin.assert:
that:
- item.create_docroot is boolean
quiet: yes
loop: "{{ httpd_vhosts }}"
loop_control:
label: "{{ item.name }}"
when:
- httpd_vhosts is defined
- item.create_docroot

- name: test if item.serveralias in httpd_vhosts is set correctly
ansible.builtin.assert:
that:
Expand Down
1 change: 1 addition & 0 deletions tasks/vhosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
when:
- httpd_vhosts is defined
- item.documentroot is defined
- item.create_docroot is not defined or item.create_docroot

- name: configure vhosts
ansible.builtin.template:
Expand Down

0 comments on commit 4f18122

Please sign in to comment.