Ansible common role. Ansible base role for building DevOps environments
Dependency | Comments |
---|---|
Ansible | Configuration management automation tool |
ESXI (6.7u3) | Hypervisor |
Python | Programming language required to run ansible |
Vagrant | VM manager. Local dev/test environment |
Virtualenv | Python environment isolation |
Command | Comments |
---|---|
address | Displays image ipv4 addresses of the VM's identified by vagrant |
clean | Destroys the VM's and cleans the vagrant cache |
config | Validates the vagrant configuration |
down | Suspends the VM's |
lint | Exectutes ansible-lint that references yamllint |
login | SSH to the VM using the ssh-config referred to by vagrant |
provision | Executes the provisioner configured in the vagrant file |
status | Used to identify the health of the VM with respect to vagrant |
up | Creates or starts the VM(s) |
venv_init | initialises virtual env directory. Required by the provisioners |
- Copy the sample.env.yaml to
env.yaml
and populate the following fieldsvm.datastore
: # datastore used by the target ESXi Hosthost
: # ESXi hostuser
: # ESXi user idpassword
: # ESXi passwordnetworks
: # Network in ESXi. It must be on the same subnet as the end user- Optional
nameserver_list
: # List of custom nameservers.nameserver_test
: # fqdn resolved by a DNS stated innameserver_list
Lint
: yamllint and ansible-lint. This is automated through Github ActionsFunctional
: Tested through Vagrant and ESXi. To be added in github actions
This repository is used as an ansible role. It can be referenced through a requirements.yaml file.
# from github
- src: https://github.com/jesmigel/ansible-role-common.git
name: common
The role can be installed through the ansible-galaxy command:
ansible-galaxy role install -r requirements.yaml -p $ROLE_DIRECTORY
- DevOps CI/CD test
- Jenkins