Command

Run a single shell command on the controlled host.

Parameters

ParameterTypeValueDescription
contentString<shell command to run>Content of the shell command to run

Examples

---
- name: Run some commands on the host
  steps:
    - name: List files in some directory
      command:
        content: ls -lh /tmp

    - name: Run the command with privileges
      with_sudo: true
      command:
        content: ls -lh /root