updated docs to suggest quote filter for shells

Also changed comments into -name in examples where appropriate.
This commit is contained in:
Brian Coca 2017-01-10 11:17:33 -05:00 committed by Brian Coca
parent 3c4afd0470
commit f9f99ddfbc
4 changed files with 79 additions and 67 deletions

View file

@ -64,15 +64,17 @@ author:
'''
EXAMPLES = '''
# Bootstrap a legacy python 2.4 host
- raw: yum -y install python-simplejson
- name: Bootstrap a legacy python 2.4 host
raw: yum -y install python-simplejson
# Bootstrap a host without python2 installed
- raw: dnf install -y python2 python2-dnf libselinux-python
- name: Bootstrap a host without python2 installed
raw: dnf install -y python2 python2-dnf libselinux-python
# Run a command that uses non-posix shell-isms (in this example /bin/sh
# doesn't handle redirection and wildcards together but bash does)
- raw: cat < /tmp/*txt
- name: Run a command that uses non-posix shell-isms (in this example /bin/sh doesn't handle redirection and wildcards together but bash does)
raw: cat < /tmp/*txt
args:
executable: /bin/bash
- name: safely use templated variables. Always use quote filter to avoid injection issues.
raw: {{package_mgr|quote}} {{pkg_flags|quote}} install {{python_simplejson|quote}}
'''