FreeKB - Ansible raw module (execute a command)
Ansible - raw module (execute a command)

If you are not familiar with modules, check out Ansible - Getting Started with Modules.

Typically, the shell, command, or script modules are used to invoke a command on a managed node. However, /usr/bin/python needs to exist on the managed node to use these modules. If Python does not exist, the raw module can be used instead. The raw module does not use Python. Typically, the raw module is used to install Python so that the shell, command, and script modules can be used.

- name: install Python using raw
  raw: yum -y install python

 

If changed is displayed, this means that Python was successfully installed on the control node (e.g. the target host).

TASK [install Python using raw]
changed: [server1.example.com]

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 643b6 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |