yapkg

Travis CI

YAPKG

This is Yet-Another-PacKaGe-installer role for ansible.

Why we do not use one of the existing roles?

  • For the first reason read the section "Promise" below. We need something reliable.
  • This role will be used by maestro and must follow the logic used there. (Of course, the role can be used without maestro..)

A note on the only mandatory variable: You need to tell what packages you want to get installed. The variable is 'yapkg__names' and takes a list of package names.

State

Stable.

Promise

Sure this role may change in the future, but we will only expand features to not break backwards compatibility.

If radical changes should become necessary, a new role will be created, probably with a version suffix...

Idea

In the inventory you can group the hosts based on certain applications and distros. The playbook will have to map the hosts in the groups to the actual name of the package to be installed and pass it on to this role. The role will then install the package(s).

Installation

ansible-galaxy install inofix.yapkg

Requirements

  • Ansible >=2.0

Role Variables

  • yapkg__list - optional, an array of strings with package name keys to be resolved against os__pkg_name
  • yapkg__names - optional, string or array of strings with package names to install, no default
  • yapkg__update_cache - optional, boolean, default=yes
  • yapkg__cache_valid_time - optional, number of seconds, default=3600
  • yapkg__task_group_name - optional, string name for the group of packages to be installed, default='packages'
  • os__pkg_name - optional (needed together with yapkg__list), containing package names per os/distro e.g. (incl. some flame-waring) os__pkg_name: jinja2: debian_stretch: "python3-jinja2" myfavoriteeditor: debian: "vim"

Dependencies

  • Currently only "Debian" is supported
  • It will test for the OS/Distro, namely
  • 'ansible_distribution'
  • 'ansible_distribution_release'
  • 'ansible_pkg_mgr'

Example Playbook

- hosts: servers
  roles:
     - { role: inofix.yapkg, yapkg__names: [ foo, bar ] }

License

GPLv3

Author Information

Install
ansible-galaxy install inofix/ansible-yapkg
GitHub repository
License
gpl-3.0
Downloads
317
Owner
INOFIX is a Luzern based software company focused on the development of free software and system solutions.