Skip to content

Commit

Permalink
Fix tags for common variable validations
Browse files Browse the repository at this point in the history
Because we validate variables related to apt, php, memcached, and sshd
together, the PHP variables need to be loaded for the `sshd` tag as
well.
  • Loading branch information
swalkinshaw committed Aug 18, 2024
1 parent c1a8ec4 commit 05640f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
paths:
- "{{ playbook_dir }}/roles/php/vars/"

tags: [php, memcached]
tags: [memcached, php, sshd]

- name: Verify dict format for apt package component variables
- name: Verify dict format for package component variables
fail:
msg: "{{ lookup('template', 'package_vars_wrong_format_msg.j2') }}"
when: package_vars_wrong_format | count
Expand All @@ -63,9 +63,9 @@
sshd_packages_default: "{{ sshd_packages_default }}"
sshd_packages_custom: "{{ sshd_packages_custom }}"
package_vars_wrong_format: "[{% for k,v in package_vars.items() | list if v | type_debug != 'dict' %}'{{ k }}',{% endfor %}]"
tags: [sshd, memcached, php]
tags: [memcached, php, sshd]

- name: Verify dict format for apt package combined variables
- name: Verify dict format for package combined variables
fail:
msg: "{{ lookup('template', 'package_vars_wrong_format_msg.j2') }}"
when: package_vars_wrong_format | count
Expand All @@ -76,7 +76,7 @@
php_extensions: "{{ php_extensions }}"
sshd_packages: "{{ sshd_packages }}"
package_vars_wrong_format: "[{% for k,v in package_vars.items() | list if v | type_debug != 'dict' %}'{{ k }}',{% endfor %}]"
tags: [sshd, memcached, php]
tags: [memcached, php, sshd]

- name: Validate Ubuntu version
debug:
Expand Down

0 comments on commit 05640f3

Please sign in to comment.