Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Fix test syntax #10

Merged
merged 1 commit into from
May 19, 2021
Merged

Fix test syntax #10

merged 1 commit into from
May 19, 2021

Conversation

harrikoo
Copy link

@harrikoo harrikoo commented Apr 16, 2020

According to https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#test-syntax
The correct form form tests is as suggested; the old way of using filter syntax produces error in Ansible 2.9 (at least).

  • Other Relevant Links (Google Groups discussion, related pull requests,
    Release pull requests, etc.)

What does this Pull Request do?

The modified line caused an error when runnign the playbook with Ansible 2.9. The proposed change fixes the error by using correct test format as suggested by Ansible documentation

What's new?

Replace | changed with is changed in a when test.

Issue

Fixes issue #7

How should this be tested?

By running the old and new versions with ansible-playbook. The old version fails with

"The conditional check 'motomo_sql_dump_create | changed' failed. The error was: template error while templating string: no filter named 'changed'. String: {% if motomo_sql_dump_create | changed %} True {% else %} False {% endif %}\n\nThe error appears to be in '/home/user/directory/islandora-playbook/roles/external/Islandora-Devops.matomo/tasks/console_install.yml': line 12, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: restore dump\n ^ here\n"

Interested parties

@Islandora-Devops/committers

According to https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html#test-syntax
The correct form form tests is as suggested; the old way of using filter syntax produces error in Ansible 2.9 (at least).
@rosiel rosiel merged commit 87ee60e into islandora-deprecated:master May 19, 2021
@rosiel rosiel mentioned this pull request May 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants