mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
updated docs to suggest quote filter for shells
Also changed comments into -name in examples where appropriate.
This commit is contained in:
parent
3c4afd0470
commit
f9f99ddfbc
4 changed files with 79 additions and 67 deletions
|
@ -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}}
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue