https://github.com/jesmigel/ansible-role-common
Ansible role repo acting as base for a DevOps centric environment.
https://github.com/jesmigel/ansible-role-common
ansible ansible-playbook ansible-role devops esxi infrastructure infrastructure-as-code vagrant
Last synced: 2 months ago
JSON representation
Ansible role repo acting as base for a DevOps centric environment.
- Host: GitHub
- URL: https://github.com/jesmigel/ansible-role-common
- Owner: jesmigel
- License: mit
- Created: 2021-06-26T02:31:48.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-31T13:07:46.000Z (almost 5 years ago)
- Last Synced: 2025-05-22T03:34:02.781Z (about 1 year ago)
- Topics: ansible, ansible-playbook, ansible-role, devops, esxi, infrastructure, infrastructure-as-code, vagrant
- Language: Makefile
- Homepage:
- Size: 50.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-role-common
[](https://opensource.org/licenses/MIT) [](https://github.com/jesmigel/ansible-role-common/actions/workflows/build.yaml)
Ansible common role. Ansible base role for building DevOps environments
### Dependencies
| Dependency | Comments |
| - | - |
| [Ansible](https://docs.ansible.com/) | Configuration management automation tool|
| [ESXI (6.7u3)](https://my.vmware.com/en/group/vmware/evalcenter?p=free-esxi6) | Hypervisor |
| [Python](https://www.python.org/downloads/) | Programming language required to run ansible |
| [Vagrant](https://www.vagrantup.com/docs) | VM manager. Local dev/test environment |
| [Virtualenv](https://docs.python.org/3/tutorial/venv.html) | Python environment isolation |
|||
### Make Commands
| 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 |
| ||
### Preflieght Steps
1. Copy the [sample.env.yaml](./sample.env.yaml) to `env.yaml` and populate the following fields
- `vm.datastore`: # datastore used by the target ESXi Host
- `host`: # ESXi host
- `user`: # ESXi user id
- `password`: # ESXi password
- `networks`: # 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 in `nameserver_list`
### Tests
- `Lint`: yamllint and ansible-lint. This is automated through Github Actions
- `Functional`: Tested through Vagrant and ESXi. To be added in github actions
### Usage
This repository is used as an ansible role. It can be referenced through a requirements.yaml file.
```yaml
# from github
- src: https://github.com/jesmigel/ansible-role-common.git
name: common
```
The role can be installed through the ansible-galaxy command:
```bash
ansible-galaxy role install -r requirements.yaml -p $ROLE_DIRECTORY
```
### ToDo
1. DevOps CI/CD test
- Jenkins