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

Wrap vars in with_items: statements #1442

Merged
merged 1 commit into from
Mar 2, 2017

Conversation

psivesely
Copy link
Contributor

The use of raw vars in Ansible with_items statements has been deprecated because
of it's ambiguity: is a a string or a var?! To help make ourselves compatible
with future Ansible verions and get rid of some of those pesky deprecation
warnings (#1427), we're appropriately wrapping them in handlebars. Helps resolve
#1427.

The use of raw vars in Ansible with_items statements has been deprecated because
of it's ambiguity: is a a string or a var?! To help make ourselves compatible
with future Ansible verions and get rid of some of those pesky deprecation
warnings (#1427), we're appropriately wrapping them in handlebars. Helps resolve
\#1427.
@psivesely
Copy link
Contributor Author

psivesely commented Nov 3, 2016

Supercedes #1435. Do see the conversation in that issue because there is more related work in the branch it was based off that we would like to merge when #1146 is resolved.

@psivesely psivesely mentioned this pull request Nov 3, 2016
@psivesely psivesely self-assigned this Nov 3, 2016
@conorsch
Copy link
Contributor

conorsch commented Nov 3, 2016

As I mentioned in #1435 (comment), these changes will need to be explicitly tested and confirmed working with:

  • ansible==1.8.4 (via pip) in staging VMs
  • ansible==1.7.2 (via apt) on Tails

If both environments honor the changes, we should be good for merge.

@conorsch
Copy link
Contributor

Ironically, Ansible warns about the allegedly superfluous presence of the handlebar syntax in with_items loops when run under old versions:

 [WARNING]: It is unnecessary to use '{{' in loops, leave variables in loop
expressions bare.

My, how times changed. While you're right that eventually we'll need to solve this problem to tackle #1146, it's not truly necessary at present, and the Ansible output will generate deprecation warnings no matter what we do (until #1146 is resolved). Still, I'm inclined to merge here—just need to repeat tests on hardware Tails.

@psivesely
Copy link
Contributor Author

psivesely commented Jan 17, 2017

Assigned @justintroutman @commandnotfound because they're going to each be doing practice installs. I figured they may as well test this PR out since they'll be working with the hardware. Talk to me before you install SD to the app/mon server, and I'll help you test this.

@conorsch
Copy link
Contributor

In #1146 we've decided to push for upgrading Ansible to 2.x during the 0.4 release. Therefore we should merge this into develop and hammer out the config tests described in #1580 to make sure the playbooks respond intelligently to out-of-date versions of Ansible.

Waiting for #1563 to be closed out, to avoid complicating the backporting of 0.3.11 changes onto develop. I'll clean up any conflicts that arise in this branch as a result of the backport.

@conorsch
Copy link
Contributor

conorsch commented Mar 2, 2017

#1563 is closed out, so this should be good for merge. Related tasks for Ansible-v2 conversion tracked in #1146.

@conorsch conorsch merged commit 812fb5c into develop Mar 2, 2017
@psivesely psivesely added this to the 0.4 milestone Mar 2, 2017
@msheiny msheiny deleted the fix-ansible-bare-variable-usage branch April 10, 2018 15:00
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.

5 participants