Skip to content

An Ansible Role to install Bash and bash development tools.

License

Notifications You must be signed in to change notification settings

while-true-do/ansible-role-app_bash

Repository files navigation

Github (tag) Github (license) Github (issues) Github (pull requests)

Travis (com)

Ansible (min. version) Ansible (platforms) Ansible (tags)

Ansible Role: app_bash

An Ansible Role to install Bash and Bash development tools.

Motivation

Bash is used on most Linux Systems. Having a role to install a proper Bash environment and optional development tools is mandatory for most Linux Users.

Description

This role installs bash packages and optionally development tools.

  • install GNU Bash and bash-completion
  • install ShellCheck (for bash scripting)
  • install Bats (the bash automated testing system)

Requirements

Used Modules:

Installation

Install from Ansible Galaxy

ansible-galaxy install while_true_do.app_bash

Install from Github

git clone https://github.com/while-true-do/ansible-role-app_bash.git while_true_do.app_bash

Dependencies:

If you plan to install bash development tools on CentOS, you will need to have EPEL enabled. You can install all dependencies automatically.

ansible-galaxy install -r requirements.yml

Usage

Role Variables

---
# defaults file for while_true_do.app_bash

## Package Management
# https://docs.ansible.com/ansible/latest/modules/package_module.html
wtd_app_bash_package:
  - bash
  - bash-completion
# State can be present|latest|absent
wtd_app_bash_package_state: "present"

wtd_app_bash_devel_package:
  - ShellCheck
  - bats
# State can be present|latest|absent|unmanaged
wtd_app_bash_devel_package_state: "unmanaged"

Example Playbook

Running Ansible Roles can be done in a playbook.

Simple

---
- hosts: all
  roles:
    - role: while_true_do.app_bash

Advanced

- hosts: all
  roles:
    - role: while_true_do.rpo_epel
    - role: while_true_do.app_bash
      wtd_app_bash_devel_package_state: "present"

Known Issues

  1. RedHat Testing is currently not possible in public, due to limitations in subscriptions.
  2. Some services and features cannot be tested properly, due to limitations in docker.

Testing

Most of the "generic" tests are located in the Test Library.

Ansible specific testing is done with Molecule.

Infrastructure testing is done with testinfra.

Automated testing is done with Travis CI.

Contribute

Thank you so much for considering to contribute. We are very happy, when somebody is joining the hard work. Please fell free to open Bugs, Feature Requests or Pull Requests after reading the Contribution Guideline.

See who has contributed already in the kudos.txt.

License

This work is licensed under a BSD-3-Clause License.

Contact