Skip to content

Fix CI run against the devel ansible-core branch #834

@Andersson007

Description

@Andersson007
SUMMARY

While working on another PR, i've noticed that some new checks had arrived with ansible-core devel branch.
Now the jinja templating is more strict and things like the above are not allowed any more:

06:59 [ERROR]: Task failed: Syntax error in expression. Template delimiters are not supported in expressions: expected name or number
06:59 
06:59 Task failed.
06:59 Origin: /root/ansible_collections/community/postgresql/tests/output/.tmp/integration/postgresql_membership-_kobo957-ÅÑŚÌβŁÈ/tests/integration/targets/postgresql_membership/tasks/postgresql_membership_initial.yml:41:3
06:59 
06:59 39   check_mode: true
06:59 40
06:59 41 - assert:
06:59      ^ column 3
06:59 
06:59 <<< caused by >>>
06:59 
06:59 Syntax error in expression. Template delimiters are not supported in expressions: expected name or number
06:59 Origin: /root/ansible_collections/community/postgresql/tests/output/.tmp/integration/postgresql_membership-_kobo957-ÅÑŚÌβŁÈ/tests/integration/targets/postgresql_membership/tasks/postgresql_membership_initial.yml:46:7
06:59 
06:59 44     - result.groups == ["{{ test_group1 }}"]
06:59 45     - result.queries == ["GRANT \"{{ test_group1 }}\" TO \"{{ test_user1 }}\""]
06:59 46     - result.granted.{{ test_group1 }} == ["{{ test_user1 }}"]
06:59          ^ column 7
06:59 
06:59 fatal: [testhost]: FAILED! => {
06:59     "changed": false,
06:59     "msg": "Task failed: Syntax error in expression. Template delimiters are not supported in expressions: expected name or number"
06:59 }

We would appreciate your help in fixing this.
What you need to do:

  1. Install ansible-core from github repo and clone the collection, see the quick-start guide, in particular:
  • clone https://github.com/ansible/ansible repo locally
  • in the same terminal window where you'll run the sanity tests and being in the ansible source directory run source hacking/env-setup
  1. go to you collection cloned directly (follow the guide ^) and run the tests
  2. fix and run, repeat until they pass

If you need any help/advice, ask

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions