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
Update examples in modules/commands to use proper YAML syntax. #35692
Update examples in modules/commands to use proper YAML syntax. #35692
Conversation
@@ -74,7 +74,8 @@ | |||
register: mymotd | |||
|
|||
- name: Run the command if the specified file does not exist. | |||
command: /usr/bin/make_database.sh arg1 arg2 creates=/path/to/database | |||
command: /usr/bin/make_database.sh arg1 arg2 | |||
creates: /path/to/database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is incorrect syntax
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It passes ansible --syntax-check?
---
- hosts: all
tasks:
- name: Run the command if the specified file does not exist.
command: /usr/bin/make_database.sh arg1 arg2
creates: /path/to/database
ANSIBLE VERSION
ansible 2.4.2.0
config file = /Users/jsmith39/src/wvu/ansible/ansible.cfg
configured module search path = [u'/Users/jsmith39/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.14 (default, Jan 9 2018, 14:55:52) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update - I do see that the syntax check does print a warning about an unknown attribute now.
Updated to fix the error. |
…le#35692) * Update examples to use proper YAML syntax. * Fix syntax error.
…le#35692) * Update examples to use proper YAML syntax. * Fix syntax error.
…le#35692) * Update examples to use proper YAML syntax. * Fix syntax error.
SUMMARY
Update examples in the modules/commands/*.py files to use proper YAML syntax instead of item= syntax.
ISSUE TYPE
COMPONENT NAME
commands/*
ADDITIONAL INFORMATION
I have created several similar PRs for the docs/docsite part of the tree. If there is interest in similar changes to the examples for other modules let me know and I'll update those and submit PRs for eah module as well.