Skip to content

Commit

Permalink
feat: quote args for ansible 2
Browse files Browse the repository at this point in the history
Merge branch 'master' of https://github.com/kaywolter/ansible-apache2 into feature/kaywolter-master
  • Loading branch information
franklinkim committed Oct 15, 2017
2 parents a4fe770 + dd7461c commit 7bab945
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tasks/manage_confs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
args:
creates: "/etc/apache2/conf-enabled/{{ item.id }}.conf"
when: item.state is not defined or item.state != 'absent'
with_items: apache2_confs
with_items: "{{ apache2_confs }}"
notify: reload apache2

- name: Disabling conf
Expand All @@ -15,5 +15,5 @@
args:
removes: "/etc/apache2/conf-enabled/{{ item.id }}.conf"
when: item.state is defined and item.state == 'absent'
with_items: apache2_confs
with_items: "{{ apache2_confs }}"
notify: reload apache2
4 changes: 2 additions & 2 deletions tasks/manage_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
args:
creates: "/etc/apache2/mods-enabled/{{ item.id }}.load"
when: item.state is not defined or item.state != 'absent'
with_items: apache2_modules
with_items: "{{ apache2_modules }}"
notify: reload apache2

- name: Disabling modules
Expand All @@ -15,5 +15,5 @@
args:
removes: "/etc/apache2/mods-enabled/{{ item.id }}.load"
when: item.state is defined and item.state == 'absent'
with_items: apache2_modules
with_items: "{{ apache2_modules }}"
notify: reload apache2
8 changes: 4 additions & 4 deletions tasks/manage_sites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
dest: "/var/www/{{ item.id }}/htdocs"
state: directory
when: item.add_webroot is defined and item.add_webroot == true
with_items: apache2_sites
with_items: "{{ apache2_sites }}"

- name: Creating sites
template:
Expand All @@ -14,21 +14,21 @@
owner: root
group: root
mode: "0644"
with_items: apache2_sites
with_items: "{{ apache2_sites }}"

- name: Enabling sites
file:
src: "/etc/apache2/sites-available/{{ item.id }}.conf"
dest: "/etc/apache2/sites-enabled/{{ item.id }}.conf"
state: link
when: item.state is not defined or item.state == 'present'
with_items: apache2_sites
with_items: "{{ apache2_sites }}"
notify: reload apache2

- name: Disabling sites
file:
src: "/etc/apache2/sites-enabled/{{ item.id }}.conf"
state: absent
when: item.state is defined and item.state == 'absent'
with_items: apache2_sites
with_items: "{{ apache2_sites }}"
notify: reload apache2

0 comments on commit 7bab945

Please sign in to comment.