Ansible

Ansible commands for configuration management and automation

28 commands
Search & Copy
Save Favorites
28
Total Commands
100%
Free Access
Lightning Fast

Available Commands

Click on any command to copy it instantly

28 commands available
28 of 28
Resources

Master Ansible

Become proficient in Ansible automation

ansible

Ping Hosts

Test connectivity to hosts

ansible all -m ping
ansible
ping
test
ansible

Check Uptime

Run uptime command on all hosts

ansible all -a "uptime"
ansible
uptime
command
ansible

Run Playbook

Execute an Ansible playbook

ansible-playbook site.yml
ansible
playbook
run
ansible

Check Mode

Dry-run Ansible playbook

ansible-playbook site.yml --check
ansible
dryrun
check
ansible

Run with Tags

Run only tagged tasks

ansible-playbook site.yml --tags "setup"
ansible
tags
ansible

Skip Tags

Skip tasks with specific tags

ansible-playbook site.yml --skip-tags "debug"
ansible
skip
tags
ansible

List Inventory

Show inventory in JSON

ansible-inventory --list
ansible
inventory
list
ansible

Inventory Graph

Visualize inventory graph

ansible-inventory --graph
ansible
inventory
graph
ansible

Module Documentation

Show documentation for a module

ansible-doc ping
ansible
doc
module
ansible

List All Modules

List all available Ansible modules

ansible-doc -l
ansible
doc
list
ansible

Install Role

Install role from Ansible Galaxy

ansible-galaxy install geerlingguy.apache
ansible
galaxy
install
ansible

Init Role

Initialize new role

ansible-galaxy init myrole
ansible
galaxy
init
ansible

Create Vault File

Create new encrypted file

ansible-vault create secrets.yml
ansible
vault
create
ansible

Edit Vault File

Edit encrypted file

ansible-vault edit secrets.yml
ansible
vault
edit
ansible

View Vault File

View encrypted file contents

ansible-vault view secrets.yml
ansible
vault
view
ansible

Encrypt File

Encrypt an existing file

ansible-vault encrypt file.yml
ansible
vault
encrypt
ansible

Decrypt File

Decrypt encrypted file

ansible-vault decrypt file.yml
ansible
vault
decrypt
ansible

View Config

View Ansible configuration

ansible-config view
ansible
config
view
ansible

List Config Options

List all Ansible config options

ansible-config list
ansible
config
list
ansible

Limit Hosts

Limit playbook run to specific hosts

ansible-playbook site.yml --limit web1
ansible
limit
hosts
ansible

Verbose Output

Run playbook with verbose output

ansible-playbook site.yml -vvv
ansible
verbose
debug
ansible

Start at Task

Start playbook at a specific task

ansible-playbook site.yml --start-at-task "Install packages"
ansible
start
task
ansible

Ansible Pull

Pull playbook from VCS and run locally

ansible-pull -U https://github.com/example/repo.git
ansible
pull
git
ansible

Show Diff

Show file differences during playbook run

ansible-playbook site.yml --diff
ansible
diff
changes
ansible

Syntax Check

Check playbook syntax

ansible-playbook site.yml --syntax-check
ansible
syntax
check
ansible

List Playbook Tags

List tags inside playbook

ansible-playbook site.yml --list-tags
ansible
list
tags
ansible

List Playbook Tasks

List tasks inside playbook

ansible-playbook site.yml --list-tasks
ansible
list
tasks
ansible

Check Version

Check installed Ansible version

ansible --version
ansible
version

Missing a command?

Help us improve this collection by suggesting commands that should be added. Your contributions help the entire developer community!