https://github.com/darkwizard242/ansible-role-hostctl
Ansible role for 'hostctl'. Available on Ansible Galaxy.
https://github.com/darkwizard242/ansible-role-hostctl
ansible ansible-galaxy ansible-role hostctl hosts-manage hostsfile linux
Last synced: 4 months ago
JSON representation
Ansible role for 'hostctl'. Available on Ansible Galaxy.
- Host: GitHub
- URL: https://github.com/darkwizard242/ansible-role-hostctl
- Owner: darkwizard242
- License: mit
- Created: 2023-04-08T19:53:37.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-24T14:06:56.000Z (about 1 year ago)
- Last Synced: 2024-12-28T02:05:11.838Z (6 months ago)
- Topics: ansible, ansible-galaxy, ansible-role, hostctl, hosts-manage, hostsfile, linux
- Language: Python
- Homepage: https://galaxy.ansible.com/darkwizard242/hostctl
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/darkwizard242/ansible-role-hostctl/actions?query=workflow%3Abuild-and-test) [](https://github.com/darkwizard242/ansible-role-hostctl/actions?query=workflow%3Arelease)  [](https://sonarcloud.io/dashboard?id=ansible-role-hostctl) [](https://sonarcloud.io/dashboard?id=ansible-role-hostctl) [](https://sonarcloud.io/dashboard?id=ansible-role-hostctl)  
# Ansible Role: hostctl
Role to install (_by default_) [hostctl](https://github.com/guumaster/hostctl) on **Debian/Ubuntu** and **EL** systems. **hostctl** is a tool that gives you more control over the use of your hosts file. You can have multiple profiles and switch them on/off as you need.
## Requirements
None.
## Role Variables
Available variables are listed below (located in `defaults/main.yml`):
### Variables list:
```yaml
hostctl_app: hostctl
hostctl_version: 1.1.4
hostctl_os: linux
hostctl_arch: 64-bit
hostctl_dl_url: https://github.com/guumaster/{{ hostctl_app }}/releases/download/v{{ hostctl_version }}/hostctl_{{ hostctl_version }}_{{ hostctl_os }}_{{ hostctl_arch }}.tar.gz
hostctl_bin_path: /usr/local/bin
hostctl_file_owner: root
hostctl_file_group: root
hostctl_file_permission_mode: '0755'
```### Variables table:
Variable | Description
---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------
hostctl_app | Defines the app to install i.e. **hostctl**
hostctl_version | Defined to dynamically fetch the desired version to install. Defaults to: **1.1.4**
hostctl_os | Defines os type. Defaults to: **linux**
hostctl_arch | Defines os architecture. Defaults to: **64-bit**
hostctl_dl_url | Defines URL to download the hostctl binary from.
hostctl_bin_path | Defined to dynamically set the appropriate path to store hostctl binary into. Defaults to (as generally available on any user's PATH): **/usr/local/bin**
hostctl_file_owner | Owner for the binary file of hostctl.
hostctl_file_group | Group for the binary file of hostctl.
hostctl_file_permission_mode | Defines the permission mode level for the file. Defaults to: `0755`## Dependencies
None
## Example Playbook
For default behaviour of role (i.e. installation of **hostctl**) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.hostctl
```For customizing behavior of role (i.e. specifying the desired **hostctl** version) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.hostctl
vars:
hostctl_version: 1.1.2
```For customizing behavior of role (i.e. placing binary of **hostctl** package in different location) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.hostctl
vars:
hostctl_bin_path: /bin/
```## License
[MIT](https://github.com/darkwizard242/ansible-role-hostctl/blob/master/LICENSE)
## Author Information
This role was created by [Ali Muhammad](https://www.alimuhammad.dev/).