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

Update examples in modules/commands to use proper YAML syntax. #35692

Merged
merged 2 commits into from May 23, 2018

Conversation

jcsmith
Copy link
Contributor

@jcsmith jcsmith commented Feb 3, 2018

SUMMARY

Update examples in the modules/commands/*.py files to use proper YAML syntax instead of item= syntax.

ISSUE TYPE
  • Docs Pull Request
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.

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. docs_pull_request module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 3, 2018
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Feb 6, 2018
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is incorrect syntax

Copy link
Contributor Author

@jcsmith jcsmith Feb 9, 2018

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)]

Copy link
Contributor Author

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.

@jcsmith
Copy link
Contributor Author

jcsmith commented Feb 9, 2018

Updated to fix the error.

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Feb 18, 2018
@ansibot ansibot added docs This issue/PR relates to or includes documentation. and removed docs_pull_request labels Mar 1, 2018
@ansibot ansibot added the affects_2.6 This issue/PR affects Ansible v2.6 label May 20, 2018
@maxamillion maxamillion merged commit a40f6b7 into ansible:devel May 23, 2018
gothicx pushed a commit to gothicx/ansible that referenced this pull request Jun 9, 2018
…le#35692)

* Update examples to use proper YAML syntax.

* Fix syntax error.
jacum pushed a commit to jacum/ansible that referenced this pull request Jun 26, 2018
…le#35692)

* Update examples to use proper YAML syntax.

* Fix syntax error.
ilicmilan pushed a commit to ilicmilan/ansible that referenced this pull request Nov 7, 2018
…le#35692)

* Update examples to use proper YAML syntax.

* Fix syntax error.
@ansible ansible locked and limited conversation to collaborators May 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.6 This issue/PR affects Ansible v2.6 core_review In order to be merged, this PR must follow the core review workflow. docs This issue/PR relates to or includes documentation. module This issue/PR relates to a module. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants