Skip to content

Ansible role that installs provided list of base packages (default: empty) for which does not make sense to create separate roles.

License

Notifications You must be signed in to change notification settings

pe-pe/ansible_role_base_packages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base Packages

Role Quality CI

Ansible role that installs provided list of base packages for which does not make sense to create separate roles.

Packages are installed according to user specification - from native operating system package manager or pip (package installer for Python into ~/.venv virtual environment).

When pip packages are requested to be installed - the role will install native operating system package to provide pip command and additional dependencies in case executed on hosts where Ansible is leveraging on Python 2.x (ie. role will install epel-release on EL7).

Requirements

None

Role Variables

Lists of packages to be installed (using native package manager and pip):

base_packages:
  - package_name1
  - package_name2
  ...

base_pip_packages:
  - pip_package_name1
  - pip_package_name2
  ...

By default both lists of packages are empty.

Default variable pip_package specifies name of native operating system package delivering pip, which is installed whenever base_pip_packages is not empty. It's set by default to:

  • python3-pip for distributions where Ansible leverages on Python 3.x
  • python-pip for other distributions

Default variable venv_package specifies name of native operating system package delivering venv, which is installed whenever base_pip_packages is not empty. It's set by default to:

  • python3-venv for distributions where Ansible leverages on Python 3.x
  • python-venv for other distributions

Dependencies

None

Example Playbook

Example how to use the role:

- hosts: all
  roles:
    - role: pe_pe.base_packages
      base_packages:
        - unzip
        - curl
      base_pip_packages:
        - molecule

License

MIT

Author Information

PePe

About

Ansible role that installs provided list of base packages (default: empty) for which does not make sense to create separate roles.

Resources

License

Stars

Watchers

Forks

Packages

No packages published