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

Add example of checking registered variable for emptiness. #15510

Merged
merged 1 commit into from
Apr 22, 2016

Conversation

forcewhisperer
Copy link
Contributor

ISSUE TYPE
  • Docs Pull Request
ANSIBLE VERSION
  ansible 2.0.1.0
  config file = 
  configured module search path = Default w/o overrides

SUMMARY

When testing for the emptiness of a registered variable, I came across a playbook using ‘when: registered_variable.stdout == “null”’. This was not working. After a little searching I discovered the check for emptiness worked like this ‘when: registered_variable.stdout == “”’. This change adds a short example at the end of the docs section on “conditionals” showing how to check a registered variable for emptiness.

@bcoca bcoca merged commit 0eead1a into ansible:devel Apr 22, 2016
@ansibot ansibot added docs This issue/PR relates to or includes documentation. and removed docs_pull_request labels Mar 3, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs This issue/PR relates to or includes documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants