September 2018
Beginner to intermediate
214 pages
5h 53m
English
This module is one of the handiest command modules. It not only allows you to run a command, it also runs shell scripts and allows you to specify the location for the working directory and the bash with which you want to execute the command line. By default, this module runs all its remote commands on the /bin/sh shell. The following playbook provides a good example:
- name: run a simple shell script shell: ./shell_script.sh >> ~/shell.txt args: chdir: /usr/local/ creates: ~/shell.txt executable: /bin/csh
Shell also has several return values that are very useful.
Read now
Unlock full access