Skip to content

darkwizard242/ansible-role-hugo

Repository files navigation

build-test release Ansible Role Maintainability Rating Reliability Rating Security Rating GitHub tag (latest SemVer) GitHub repo size

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.126.1
hugo_os: "{{ ansible_system }}"
hugo_arch: "64bit"
hugo_dl_url: https://github.com/gohugoio/hugo/releases/download/v{{ hugo_version }}/{{ hugo_app }}_{{ hugo_version }}_{{ hugo_os }}-{{ hugo_arch }}.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.126.1
hugo_os Defines OS type. Used for obtaining the correct type of binaries based on OS. Defaults to: {{ ansible_system }}
hugo_arch Defines Architecture type. Used for obtaining the correct type of binaries based on Architecture. Defaults to: 64bit
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

MIT

Author Information

This role was created by Ali Muhammad.