Added an example of mixed format argv in command module (#80933)

Fixes: #80126

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/80959/head
Abhijeet Kasurde 1 year ago committed by GitHub
parent 79677c16f1
commit c069cf88de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -161,6 +161,17 @@ EXAMPLES = r'''
- dbname with whitespace
creates: /path/to/database
- name: Run command using argv with mixed argument formats
ansible.builtin.command:
argv:
- /path/to/binary
- -v
- --debug
- --longopt
- value for longopt
- --other-longopt=value for other longopt
- positional
- name: Safely use templated variable to run command. Always use the quote filter to avoid injection issues
ansible.builtin.command: cat {{ myfile|quote }}
register: myoutput

Loading…
Cancel
Save