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

syntax error with ansible 2.6 #26

Closed
wants to merge 1 commit into from

Conversation

rhmk
Copy link

@rhmk rhmk commented May 9, 2019

When running this role with ansible 2.6 an error is thrown "unknow operand". changing eq to equalto fixes the problem

@pcahyna
Copy link
Member

pcahyna commented May 9, 2019

Thanks. This should not depend on the version of Ansible; it is a Jinja2 feature. "eq" as a synonym for "equalto" was introduced in Jinja2 2.10: http://jinja.pocoo.org/docs/2.10/changelog/ (PR pallets/jinja#665 ). I agree that we should use the name that is supported in older Jinja2 versions. How to test this in the CI? @tyll do you think it would be OK to use an older version of Jinja2 in the CI (would probably mean to downgrade the CI container)?

@tyll
Copy link
Member

tyll commented May 13, 2019

Thanks. This should not depend on the version of Ansible; it is a Jinja2 feature. "eq" as a synonym for "equalsto" was introduced in Jinja2 2.10: http://jinja.pocoo.org/docs/2.10/changelog/ (PR pallets/jinja#665 ). I agree that we should use the name that is supported in older Jinja2 versions. How to test this in the CI? @tyll do you think it would be OK to use an older version of Jinja2 in the CI (would probably mean to downgrade the CI container)?

If we want to control the versions, we should probably install them using pip instead of using RPMs. With RPMs we have only limited flexibility with downgrading packages and it is very likely that once we update the container image to Fedora 30, we will only have Jina 2.10 or newer as RPM.

@pcahyna pcahyna requested a review from dwlehman May 29, 2019 12:26
@pcahyna
Copy link
Member

pcahyna commented May 29, 2019

Travis on the other hand has Jinja2 v. 2.8, it seems.

@pcahyna
Copy link
Member

pcahyna commented Aug 13, 2019

Hello, thanks for the patch.
I've just merged #34, which is a complete rewrite (uses a module written in Python and based on blivet), and your changes no longer apply. I've preserved the old version as the prototype-0-1 branch and applied your PR to it, instead to master.

@pcahyna pcahyna closed this Aug 13, 2019
@pcahyna
Copy link
Member

pcahyna commented Oct 17, 2019

Even eq is not supported in Jinja 2.7.2 that is in RHEL7 . We need to use ==. @yontalcar

@pcahyna
Copy link
Member

pcahyna commented Jan 22, 2020

Ideally the prototype-0-1 branch should be updated because it suffers from the same problem as in #49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants