What is Ansible? - Open source automation platform providing language that allows to describe in a
declarative fashion a desired state of IT application infrastructure.
Ansible Playbooks are written in... - YAML
Ansible traits - 1. Agentless - target systems do not need any agent software. Ansible most often
connects to target systems via SSH/WinRM and injects small programs called "ansible modules" that put
the system in the desired state, described in the playbook.
2. Cross-platform
3. Human-readable
Ansible Node Types - 1. Control node - Ansible is installed there and it stores playbooks, inventories etc.
2. Managed hosts - Those are listed in inventories. Hosts which control node connects and makes
changes to put them in the desired state, defined by a playbook.
What does it mean that Ansible is indempotent? - You can safely run a playbook on the same hosts
multiple times. When your systems are in the correct state, the playbook makes no changes when you
run it. Not every module adheres to that out of the box.
How to register new RHEL for subscription? - Usually two commands are used to do that:
What is Ansible Inventory? And what types are there. - Collection of hosts that Ansible will manage.
Those hosts can be assigned to groups that are collectively managed. Those groups can have child
groups and hosts can be in multiple groups.
Default Ansible inventory resides in /etc/ansible/hosts
Inventory can be:
1. Static - defined in a INI or YAML text file
2. Dynamic - generated by a script or program as needed
, Groups in Ansible Inventory - Inventory always has 2 default groups:
1. all - every host mentioned in the inventory
2. ungrouped - every host mentioned in the inventory that is not a member of any other group
Normal groups are defined as:
[groupname]
host1
host2
192.168.0.34
Nested groups are defined as:
[biggergroupname:children]
groupname
Ranges of IP addresses as well as numbers in hostnames are also allowed: [START:END]
ansible -i inventory.ini groupname --list-hosts - verifies inventory file by listing hosts from a group
Ansible configuration files (with precendence) - From lowest to highest precedence:
1. /etc/ansible/ansible.cfg - default, provided with installation
2. ~/.ansible.cfg
3. ./ansible.cfg - directory from which ansible command is executed (most recommended, best practice)
4. ANSIBLE_CONFIG environment variable
Ansible looks for those file from 4th to 1st, and uses only configuration from the one it found first.
How to generate a sample Ansible config - ansible-config init --disabled > ansible.cfg
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller oneclass. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $13.48. You're not tied to anything after your purchase.