dudefellah.iac
dudefellah.iac
This is a general role for installing and configuring software (iac). It installs packages for your system, copies files based on your input, and can reload or restart services if configuration files change.
This role might not appeal to everyone, but it's helpful for many simple software installations that don't need a complete role to be set up.
If you are using this role to install configuration files, it includes basic templates for .ini, .json, and .yaml files.
Requirements
None.
Role Variables
Role variables can be found with comments in defaults/main.yml.
Dependencies
None.
Example Playbook
To install and configure vdirsyncer for a specific user (note that this playbook hasn't been tested, but it shows how it works):
- hosts: all
tasks:
- name: Install and configure vdirsyncer
include_role:
name: dudefellah.iac
vars:
iac_user: bob
iac_group: bob
iac_packages:
- vdirsyncer
iac_handler_service_name: null
iac_handler_command: vdirsyncer sync
iac_config_files:
- path: .config/vdirsyncer/config
content: |
[general]
status_path = "~/.vdirsyncer/status"
...
Or, to install polybar for your x11 setup. First, check your .ini file with validini:
- name: Install and configure polybar
include_role:
name: dudefellah.iac
vars:
iac_user: bob
iac_group: bob
iac_config_files:
- path: .config/polybar/config
src: iac.ini.j2
vars:
colors:
background: "#222"
background-alt: "#444"
...
validate: "validini %s"
License
GPLv2+
Author Information
Dan - github.com/dudefellah