diodonfrost.glab
ansible-role-glab
This role provide a compliance for install glab on your target host.
Requirements
None.
Role Variables
This role has multiple variables. The defaults for all these variables are the following:
---
# defaults file for ansible-role-glab
# Define glab version to install
# Default: latest
glab_version: latest
# Define where to download glab package url
# Default: use local system path defined in Ansible vars/*.yml
glab_pkg_url: "{{ default_glab_pkg_url }}"
# Define where to install glab binary
# Default: use local system path defined in Ansible vars/*.yml
glab_bin_directory: "{{ default_glab_bin_directory }}"
Dependencies
None
Example Playbook
This is a sample playbook file for deploying the Ansible Galaxy glab role in a localhost and installing the latest version of glab.
---
- hosts: localhost
become: true
roles:
- role: diodonfrost.glab
This role can also install a specific version of glab.
---
- hosts: localhost
become: true
roles:
- role: diodonfrost.glab
vars:
glab_version: v1.31.0
Local Testing
This project uses Molecule to aid in the development and testing.
To develop or test you'll need to have installed the following:
- Linux (e.g. Ubuntu)
- Docker
- Python (including python-pip)
- Ansible
- Molecule
- Libvirt (if you test windows system)
- Vagrant (if you test windows system)
Testing with Docker
# Install requirements
pip install -r requirements-dev.txt
# Test ansible role with ubuntu 22.04
molecule test
# Test ansible role with ubuntu 20.04
image=ansible-ubuntu:20.04 molecule test
# Test ansible role with alpine latest
image=ansible-alpine:latest molecule test
# Create ubuntu 22.04 instance
molecule create
# Apply role on ubuntu 22.04 instance
molecule converge
# Launch tests on ubuntu 22.04 instance
molecule verify
Testing with Vagrant and Libvirt
# Test ansible role with Windows
molecule test -s windows
License
Apache 2
Author Information
This role was created in 2023 by diodonfrost.
Install
ansible-galaxy install diodonfrost.glabLicense
apache-2.0
Downloads
200
Owner
