Ansible Cheat Sheet By Seth Kenlon
Ansible Cheat Sheet
By Seth Kenlon
Ansible provides simple but powerful automation for cross-platform computer support. Ansible playbooks are written in YAML, and executed either locally or remotely.
Command ansible-playbook file.yaml Authentication options --user, -u --private-key, --key-file --ssh-extra-args --vault-id --vault-password-file --ask-vault-pass --become --ask-become-pass --become-method ansible-doc ?-type foo --list
Control options --syntax-check --list-hosts --list-tasks --start-at-task --check --diff --module-path --connection
Run an Ansible playbook called file.yaml
Log in as username Log in using SSH key (usually in ~/.ssh) Pass extra command options to SSH Use vault identity ID Use vault password file key Prompt for a vault password Escalate privileges Prompt for a password for become Escalate privilege using a specific method List choices for become, connection, and other Ansible options
Verify syntax of a playbook, but do not run it Show hosts listed in a playbook Show tasks defined in a playbook Run playbook starting at task name Run the playbook but don't make changes Show diffs for what changes are made Prepend colon-separated path to default path Connect over method
Twitter @opensourceway ? @osdc
CC BY-SA 4.0
Ansible Cheat Sheet
By Seth Kenlon
Playbook and YAML Parameter: value - foo - bar - baz Distro:
- Fedora - RHEL - Debian - Slackware OS: - Linux: Fedora - BSD: NetBSD Playbook structure --- name: "My play" hosts: all
tasks: - name: "My task"
some_module:
path: `/example/'
- name: "My other task" other_module: foo: `bar'
A YAML mapping entry is a key and a value A YAML sequence entry is an itemized list
A mapping entry can contain a sequence
Sequence items can contain mappings
YAML files start with three dashes Use the name mapping to name your play Indent, and define which hosts the play runs on. List target hosts in etc/ansible/hosts Open a tasks mapping, which will contain a sequence Give the task a name with the name mapping Import a module as a new mapping containing a sequence of parameters. Find required and optional parameters in the module's documentation. Parameters are usually mappings using the command option as the key and an argument as the value. A play may contain more than one task A task usually imports a module
Twitter @opensourceway ? @osdc
CC BY-SA 4.0
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- ansible automation for sysadmins
- ansible e n v i r o n m e n t s e t u p ad h o c c o m m a n d s cheat
- ansible tower administration guide
- ansible hands on introduction red hat
- automate infrastructure lifecycle management on pca using ansible oracle
- the benefits of agentless architecture ansible
- configuring ansible to manage windows servers step by step
- ansible e n v i r o n m e n t s e t u p ad h o c c o m m intellipaat
- resource module deep dive into ansible network
- ansible in depth
Related searches
- cheat sheet for word brain game
- macro cheat sheet pdf
- logarithm cheat sheet pdf
- excel formula cheat sheet pdf
- excel formulas cheat sheet pdf
- excel cheat sheet 2016 pdf
- vba programming cheat sheet pdf
- macro cheat sheet food
- free excel cheat sheet download
- onenote cheat sheet pdf
- punctuation rules cheat sheet pdf
- excel formula cheat sheet printable