Skip to content

Commit

Permalink
Merge pull request netgen#35 from netgen/feature/ansible-futureproof
Browse files Browse the repository at this point in the history
Encase vars.
  • Loading branch information
emodric committed Dec 19, 2016
2 parents c705cea + bb126f1 commit 58101b2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions provisioning/roles/apache/tasks/main.yml
Expand Up @@ -8,7 +8,7 @@

- name: Install Apache packages
apt: name="{{ item }}" state=present update_cache=yes
with_items: apache_packages
with_items: "{{ apache_packages }}"
when: ansible_os_family == "Debian"
tags: [apache2, packages]

Expand All @@ -29,7 +29,7 @@

- name: enable Apache2 modules
apache2_module: state=present name="{{ item }}"
with_items: common_modules
with_items: "{{ common_modules }}"
notify: restart Apache
when: ansible_os_family == "Debian"
tags: [apache2]
Expand Down
2 changes: 1 addition & 1 deletion provisioning/roles/common/tasks/main.yml
Expand Up @@ -5,7 +5,7 @@

- name: Install the common tools (APT)
apt: name="{{ item }}" state=present update_cache=yes
with_items: common_packages
with_items: "{{ common_packages }}"
when: ansible_os_family == "Debian"
tags: [packages]

Expand Down
2 changes: 1 addition & 1 deletion provisioning/roles/mailcatcher/tasks/main.yml
Expand Up @@ -12,7 +12,7 @@

- name: Install the mailcatcher prerequisites (APT)
apt: name="{{ item }}" state=latest update_cache=yes
with_items: mailcatcher_packages
with_items: "{{ mailcatcher_packages }}"
when: ansible_os_family == "Debian"
tags: [mailcatcher, packages]

Expand Down
4 changes: 2 additions & 2 deletions provisioning/roles/mysql/tasks/main.yml
Expand Up @@ -10,7 +10,7 @@

- name: Remove the existing mysql libraries
apt: name="{{ item }}" state=absent update_cache=yes
with_items: mysql_packages
with_items: "{{ mysql_packages }}"
when: ansible_os_family == "Debian" and use_mysql56 == true and not mysql_version_result|failed == false
tags: [mysql, mysql56, packages]

Expand All @@ -27,7 +27,7 @@

- name: Install the packages
apt: name="{{ item }}" state=present update_cache=yes
with_items: mysql_packages
with_items: "{{ mysql_packages }}"
when: ansible_os_family == "Debian"
tags: [mysql,packages]

Expand Down
16 changes: 8 additions & 8 deletions provisioning/roles/php/tasks/main.yml
Expand Up @@ -33,7 +33,7 @@
- name: Install xdebug
apt: name="{{ item }}" state=present update_cache=yes
# located in vars/main.yml
with_items: php_xdebug
with_items: "{{ php_xdebug }}"
when: ansible_os_family == "Debian" and use_xdebug == true
tags: [php, packages, xdebug, dev]

Expand All @@ -48,28 +48,28 @@
- name: Install the php-fpm specific libraries (APT)
apt: name="{{ item }}" state=present update_cache=yes
# located in vars/main.yml
with_items: php_fpm_packages
with_items: "{{ php_fpm_packages }}"
when: ansible_os_family == "Debian" and use_php5_fpm == true
tags: [php, php_fpm, packages]

- name: Remove the php-fpm specific libraries (APT)
apt: name="{{ item }}" state=absent update_cache=yes
# located in vars/main.yml
with_items: php_fpm_packages
with_items: "{{ php_fpm_packages }}"
when: ansible_os_family == "Debian" and use_php5_fpm == false
tags: [php, php_fpm, packages]

- name: Install the php non-fpm specific libraries (APT)
apt: name="{{ item }}" state=present update_cache=yes
# located in vars/main.yml
with_items: php_nofpm_packages
with_items: "{{ php_nofpm_packages }}"
when: ansible_os_family == "Debian" and use_php5_fpm == false
tags: [php, packages]

- name: Remove the php non-fpm specific libraries (APT)
apt: name="{{ item }}" state=absent update_cache=yes
# located in vars/main.yml
with_items: php_nofpm_packages
with_items: "{{ php_nofpm_packages }}"
when: ansible_os_family == "Debian" and use_php5_fpm == true
tags: [php, packages]

Expand All @@ -91,7 +91,7 @@
group=root
mode=0644
# located in defaults/main.yml
with_items: php_fpm_www_additional
with_items: "{{ php_fpm_www_additional }}"
when: php_fpm_www_additional|lower != 'none' and use_php5_fpm == true
notify:
- restart php5-fpm
Expand Down Expand Up @@ -123,14 +123,14 @@
- name: Disable non-used MPM in Apache (FPM related)
apache2_module: state=absent name="{{ item }}"
ignore_errors: True
with_items: apache_nonfpm_mpm
with_items: "{{ apache_nonfpm_mpm }}"
notify: restart Apache
when: ansible_os_family == "Debian" and use_php5_fpm == true
tags: [php, php_fpm]

- name: Enable required MPM in Apache (FPM related)
apache2_module: state=present name="{{ item }}"
with_items: apache_fpm_mpm
with_items: "{{ apache_fpm_mpm }}"
notify: restart Apache
when: ansible_os_family == "Debian" and use_php5_fpm == true
tags: [php, php_fpm]
Expand Down

0 comments on commit 58101b2

Please sign in to comment.