Skip to content

Commit

Permalink
Cleanup output and restrucutre loop+loop_control.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Feb 27, 2021
1 parent 3e74580 commit 48f7d09
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,27 @@
dest: "{{ httpd_config_directory }}/{{ item.name }}.conf"
mode: "0644"
loop: "{{ httpd_locations }}"
loop_control:
label: "{{ item.name }}"
notify:
- test httpd configuration validity
- restart httpd
when:
- httpd_locations is defined
loop_control:
label: "{{ item.name }}"

- name: configure vhosts
ansible.builtin.template:
src: vhost.conf.j2
dest: "{{ httpd_config_directory }}/{{ item.name }}.conf"
mode: "0644"
loop: "{{ httpd_vhosts }}"
loop_control:
label: "{{ item.name }}"
notify:
- test httpd configuration validity
- restart httpd
when:
- httpd_vhosts is defined
loop_control:
label: "{{ item.name }}"

- name: configure httpd
ansible.builtin.template:
Expand Down Expand Up @@ -108,6 +108,8 @@
state: directory
mode: "0755"
loop: "{{ httpd_vhosts }}"
loop_control:
label: "{{ item.docroot }}"
when:
- httpd_vhosts is defined
- item.documentroot is defined
Expand Down

0 comments on commit 48f7d09

Please sign in to comment.