Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove jinja2 templating from assertion predicates #631

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
- name: Check that all required packages have been installed
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[package] }} is defined"
- ansible_facts.packages[package] is defined
fail_msg: "Package {{ package }} has not been installed."
success_msg: "Package {{ package }} has been installed."
loop: "{{ package_list }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/install_dbserver/tasks/validate_install_dbserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
- name: Check that all required packages have been installed
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[package] }} is defined"
- ansible_facts.packages[package] is defined
fail_msg: "Package {{ package }} has not been installed."
success_msg: "Package {{ package }} has been installed."
loop: "{{ package_list }}"
Expand Down
4 changes: 2 additions & 2 deletions roles/setup_barman/tasks/validate_setup_barman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
- name: Check if backup server has been configured correctly.
ansible.builtin.assert:
that:
- barman_list_server_res.stdout_lines is search('{{ primary_inventory_hostname }}')
- barman_list_server_res.stdout_lines is search(primary_inventory_hostname)
fail_msg: "{{ primary_inventory_hostname }} backup server was not configured correctly."
success_msg: "{{ primary_inventory_hostname }} backup server was configured correctly."
run_once: true
Expand All @@ -64,7 +64,7 @@
- name: Check if barman home directory has been configured correctly
ansible.builtin.assert:
that:
- barman_show_server_res.stdout_lines is search('{{ barman_home }}')
- barman_show_server_res.stdout_lines is search(barman_home)
fail_msg: "{{ barman_home }} directory was not configured correctly"
success_msg: "{{ barman_home }} directory was configured correctly"
run_once: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- name: Check that all required barman packages have been installed
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[item] }} is defined"
- ansible_facts.packages[item] is defined
fail_msg: "Package {{ item }} has not been installed."
success_msg: "Package {{ item }} has been installed."
loop:
Expand Down
2 changes: 1 addition & 1 deletion roles/setup_dbt2/tasks/validate_setup_dbt2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- name: Check that all packages in dbt2_db_pkg_list has been installed
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[package] }} is defined"
- ansible_facts.packages[package] is defined
fail_msg: "Package {{ package }} has not been installed."
success_msg: "Package {{ package }} has been installed."
loop: "{{ dbt2_db_pkg_list }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- name: Check that all packages in dbt2_client_pkg_list has been installed
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[package] }} is defined"
- ansible_facts.packages[package] is defined
fail_msg: "Package {{ package }} has not been installed."
success_msg: "Package {{ package }} has been installed."
loop: "{{ dbt2_client_pkg_list }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- name: Check that all packages in dbt2_driver_pkg_list has been installed
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[package] }} is defined"
- ansible_facts.packages[package] is defined
fail_msg: "Package {{ package }} has not been installed."
success_msg: "Package {{ package }} has been installed."
loop: "{{ dbt2_driver_pkg_list }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/setup_dbt3/tasks/validate_setup_dbt3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- name: Check that all packages in dbt3_db_pkg_list has been installed
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[package] }} is defined"
- ansible_facts.packages[package] is defined
fail_msg: "Package {{ package }} has not been installed."
success_msg: "Package {{ package }} has been installed."
loop: "{{ dbt3_db_pkg_list }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/setup_dbt7/tasks/validate_setup_dbt7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- name: Check that all packages in dbt7_db_pkg_list has been installed
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[package] }} is defined"
- ansible_facts.packages[package] is defined
fail_msg: "Package {{ package }} has not been installed."
success_msg: "Package {{ package }} has been installed."
loop: "{{ dbt7_db_pkg_list }}"
Expand Down
4 changes: 2 additions & 2 deletions roles/setup_efm/tasks/validate_setup_efm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
- name: Check that all required packages have been installed on RedHat
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[item] }} is defined"
- ansible_facts.packages[item] is defined
fail_msg: "Package {{ item }} has not been installed."
success_msg: "Package {{ item }} has been installed."
loop:
Expand All @@ -66,7 +66,7 @@
- name: Check that all required packages have been installed on Debian
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[item] }} is defined"
- ansible_facts.packages[item] is defined
fail_msg: "Package {{ item }} has not been installed."
success_msg: "Package {{ item }} has been installed."
loop:
Expand Down
2 changes: 1 addition & 1 deletion roles/setup_pemserver/tasks/validate_setup_pemserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
- name: Check that all required packages have been installed
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[item] }} is defined"
- ansible_facts.packages[item] is defined
fail_msg: "Package {{ item }} has not been installed."
success_msg: "Package {{ item }} has been installed."
loop: "{{ pem_server_packages }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/setup_pgpool2/tasks/validate_setup_pgpool2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
- name: Check that all required pgpool2 packages have been installed
ansible.builtin.assert:
that:
- "{{ ansible_facts.packages[package] }} is defined"
- ansible_facts.packages[package] is defined
fail_msg: "Package {{ package }} has not been installed."
success_msg: "Package {{ package }} has been installed."
loop: "{{ pgpool2_packages_check }}"
Expand Down
Loading