Skip to content

MaxValue/ansible-role-default_packages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: Default Packages

An Ansible Role that installs a set of predefined packages on the host.

[TOC]

Requirements

None.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

Main Variables

packages:
  - zsh
  - mosh
  - rsync
  - vim

The optional variable packages defines the list of packages to be installed. Each item can also be a mapping; in this case, there should be a key all which is the fallback name for all package managers. Using the package manager name as key you can define an alternative package name for that specific package manager. Using '' as a value for a package manager skips this package for that package manager.

Internal variables

These are variables internally created by the role. Please do not use them in your code.

_packages_selected_raw

The internal variable _packages_selected_raw contains a string of comma separated package names taken from the packages variable.

_packages_selected

The internal variable _packages_selected contains a list of package names taken from the _packages_selected_raw variable.

Dependencies

  • The community.general collection: ansible-galaxy collection install --force community.general

Example Playbooks

Normal usage

---
# This installs the built-in list of packages
- hosts: localhost
  roles:
    - role:
        name: maxvalue.default_packages
...

Provide a specific list

---
# This installs the given list of packages
- hosts: localhost
  roles:
    - role:
        name: maxvalue.default_packages
      vars:
        packages:
          - all: false
            homebrew: little-snitch
...

License

MIT

Sponsors

You can support the development of this role and other similar roles by donating to one of the accounts below.

Author Information

This role was created in 2023 by Max Fuxjäger:

About

An Ansible Role that installs a set of predefined packages on the host.

Topics

Resources

License

Stars

Watchers

Forks