Skip to content

painless-software/ansible-role-software

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: Software

Painless software provisioning for your developer machine.

Ansible role for installing and configuring software on desktop computers, such as developer notebooks in your office.

Inspired by the magnificent puppet-software Puppet module.

Requirements

Supported operating systems and GNU/Linux distributions:

  • Ubuntu 22.04 LTS Jammy
  • Ubuntu 21.10 Impish
  • Ubuntu 21.04 Hirsute
  • Ubuntu 20.04 LTS Focal
  • Ubuntu 18.04 LTS Bionic
  • Kali Linux (Debian)

Others may work but have not been verified by test installations.

Role Variables

Secrets that should be overridden by anyone installing the affected software (see vars/secrets.yml).

Dependencies

None.

Example Playbook

- hosts: localhost
  roles:
    - painless.software

Usage

Ideally, you use this role with automated provisioning (e.g. using an ENC like The Foreman), which sets up your target OS, installs Ansible, and then launches a playbook similar to the example above.

Alternatively, you can run this Ansible role from the terminal in a manual fashion, e.g.

ansible localhost -m include_role -a role=painless.software

The more obvious way is to write a simple playbook (see above), specify only the software you want to install, include your custom settings and/or personal secrets, and run your playbook as usual:

ansible-playbook playbook.yml -K

Packages that must be downloaded manually cannot be upgraded automatically without sacrificing speed. To force upgrading use state=latest, e.g.

# HINT: for a list of available tags use --list-tags
ansible-playbook playbook.yml -K -t citrix,geogebra,zoom -e state=latest

To uninstall a software (when supported) use state=absent, e.g.

ansible-playbook playbook.yml -K -t vmware -e state=absent

Prerequisites

Obviously, you need Ansible to install this role and run your playbook, e.g.

sudo apt-get install ansible
ansible-galaxy install painless.software

If some software fails to install, complaining pip is not installed, either include the python tag in your Ansible run or run:

sudo apt-get install python3-pip

For software that is provided as snaps on Debian distributions without snap pre-installed (e.g. Kali), you need to include the snap tag in your Ansible run or install and configure snapd manually, e.g.

sudo apt-get install snapd
sudo systemctl enable --now snapd.socket snapd apparmor
sudo snap install core

Distributions that use Zsh may need to source /etc/zsh/zprofile to set up PATH for snaps and other applications. In doubt, add this to ~/.zshrc:

source /etc/zsh/zprofile

How Does It Work?

Ansible picks up a description of the state you want your system to be in in the form of tasks. You can control which tasks are executed and which variables you pass in by help of the inventory. Write your own inventory file and use it by specifying it at the command line (via the -i option) to customize the behavior of the Ansible playbook runs.

If you only want to update specific features use tags (via the --tags or the --skip-tags option). You can use --list-tags to list all the available tags.

More Reading

License

GPL 3.0

Author Information

Provided by Painless Software.