OnWorks favicon

ansible-playbook - Online in the Cloud

Run ansible-playbook in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command ansible-playbook that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



ansible-playbook - run an ansible playbook


ansible-playbook <filename.yml> ... [options]


Ansible playbooks are a configuration and multinode deployment system. Ansible-playbook is
the tool used to run them. See the project home page (link below) for more information.


The names of one or more YAML format files to run as ansible playbooks.


Ask for privilege escalation password.

-k, --ask-pass
Prompt for the connection password, if it is needed for the transport used. For
example, using ssh and not having a key-based authentication with ssh-agent.

Prompt for su password, used with --su (deprecated, use become).

-K, --ask-sudo-pass
Prompt for the password to use with --sudo, if any (deprecated, use become).

Prompt for vault password.

-C, --check
Do not make any changes on the remote system, but test resources to see what might
have changed. Note this can not scan all possible resource types and is only a

Connection type to use. Most common options are paramiko (SSH), ssh, winrm and local.
local is mostly useful for crontab or kickstarts.

-D, --diff
When changing any templated files, show the unified diffs of how they changed. When
used with --check, shows how the files would have changed if --check were not used.

-e EXTRA_VARS, --extra-vars=EXTRA_VARS
Extra variables to inject into a playbook, in key=value key=value format or as quoted
YAML/JSON (hashes and arrays). To load variables from a file, specify the file
preceded by @ (e.g. @vars.yml).

Clear the fact cache.

Run handlers even if a task fails.

-f NUM, --forks=NUM
Level of parallelism. NUM is specified as an integer, the default is 5.

-h, --help
Show help page and exit

-i PATH, --inventory=PATH
The PATH to the inventory, which defaults to /etc/ansible/hosts. Alternatively you can
use a comma separated list of hosts or single host with traling comma host,.

-l SUBSET, --limit=SUBSET
Further limits the selected host/group patterns. You can prefix it with ~ to indicate
that the pattern in a regex.

Outputs a list of matching hosts; does not execute anything else.

List all available tags; does not execute anything else.

List all tasks that would be executed; does not execute anything else.

The DIRECTORY search path to load modules from. The default is /usr/share/ansible.
This can also be set with the ANSIBLE_LIBRARY environment variable.

Use this file to authenticate the connection

Only run plays and tasks whose tags do not match these values.

Start the playbook at the task matching this name.

One-step-at-a-time: confirm each task before running.

-S, --su*
Run operations with su (deprecated, use become)

-R SU-USER, --su-user=SU_USER
run operations with su as this user (default=root) (deprecated, use become)

-s, --sudo
Run the command as the user given by -u and sudo to root (deprecated, use become).

--ssh-common-args='-o ProxyCommand="ssh -W %h:%p ..." ...'
Add the specified arguments to any sftp/scp/ssh command-line. Useful to set a
ProxyCommand to use a jump host, but any arguments that are accepted by all three
programs may be specified.

--sftp-extra-args='-f ...'
Add the specified arguments to any sftp command-line.

--scp-extra-args='-l ...'
Add the specified arguments to any scp command-line.

--ssh-extra-args='-R ...'
Add the specified arguments to any ssh command-line.

Sudo to SUDO_USERNAME deafult is root. (deprecated, use become).

Only run plays and tasks whose tags do not match these values.

Look for syntax errors in the playbook, but don’t run anything

-t, TAGS, --tags=TAGS
Only run plays and tasks tagged with these values.

Connection timeout to use when trying to talk to hosts, in SECONDS.

Use this USERNAME to login to the target host, instead of the current user.

Vault password file.

-v, --verbose
Verbose mode, more output from successful actions will be shown. Give up to three
times for more output.

Show program’s version number and exit.


The following environment variables may be specified.

ANSIBLE_INVENTORY — Override the default ansible inventory file

ANSIBLE_LIBRARY — Override the default ansible module library path

ANSIBLE_CONFIG — Override the default ansible config file

Many more are available for most options in ansible.cfg

Use ansible-playbook online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

Linux commands