hugo
Ansible Role: Hugo
Role to install (by default) extended hugo on Debian/Ubuntu and EL systems.
Requirements
None.
Role Variables
Available variables are listed below (located in defaults/main.yml
):
Variables list:
hugo_app: hugo_extended
hugo_version: 0.133.1
hugo_os: "{{ ansible_system | lower }}"
hugo_architecture_map:
amd64: amd64
arm: arm64
x86_64: amd64
armv6l: armv6
armv7l: armv7
aarch64: arm64
32-bit: "386"
64-bit: amd64
hugo_dl_url: https://github.com/gohugoio/hugo/releases/download/v{{ hugo_version }}/{{ hugo_app }}_{{ hugo_version }}_{{ hugo_os }}-{{ hugo_architecture_map[ansible_architecture] }}.tar.gz
hugo_bin_path: /usr/local/bin
hugo_file_owner: root
hugo_file_group: root
hugo_file_mode: '0755'
Variables table:
Variable | Description |
---|---|
hugo_app | Defines the app to install i.e. hugo_extended |
hugo_version | Defined to dynamically fetch the desired version to install. Defaults to: 0.133.1 |
hugo_os | Defines OS type. Used for obtaining the correct type of binaries based on OS. |
hugo_architecture_map | Defines Architecture type. Used for obtaining the correct type of binaries based on Architecture. |
hugo_dl_url | Defines URL to download the hugo binary from. |
hugo_bin_path | Defined to dynamically set the appropriate path to store hugo binary into. Defaults to (as generally available on any user's PATH): /usr/local/bin |
hugo_file_owner | Owner for the binary file of hugo. |
hugo_file_group | Group for the binary file of hugo. |
hugo_file_mode | Mode for the binary file of hugo. |
Dependencies
None
Example Playbook
For default behaviour of role (i.e. installation of hugo) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.hugo
For customizing behavior of role (i.e. specifying the desired hugo version) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.hugo
vars:
hugo_version: 0.78.2
For customizing behavior of role (i.e. placing binary of hugo package in different location) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.hugo
vars:
hugo_bin_path: /bin/
License
Author Information
This role was created by Ali Muhammad.
About
Installs/Uninstalls 'Hugo', which is one of the most popular open source static site generator.
Install
ansible-galaxy install darkwizard242/ansible-role-hugo
License
mit
Downloads
4198
Owner
Senior DevOps/CloudOps Engineer.
Dedicated to Automating everything I come across.
Love to work on and learn new technologies/tools everyday!