# Ansible

## Ansible 101

### Why Ansible

Automate the repetitive tasks involve:

* provisioning
* configuration
* CD
* application deployment
* security compliance

### Concept

#### Control node

#### Managed node

#### Inventory

### Commands

<details>

<summary>Install</summary>

```bash
# clone a repo to local machine
python3 -m pip installl --user ansible

# create an inventory by adding the IP address or FQDN to
# /etc/ansible/hosts
[myvirtualmachines]
192.0.2.50
192.0.2.51
192.0.2.52

# verify the hosts in inventory
ansible all --list-hosts
```

</details>

<details>

<summary>Connection</summary>

```bash
# ssh connection
ssh username@192.0.2.50

# ping the managed nodes
ansible all -m ping
```

</details>

## Advanced Ansible
