bashaliases
ANSIBLE-ROLE-BASHALIASES
Ansible role add Bash aliases in bash file you want.
Howto use this role?
This role need to be include in a playbook.
Call this Galaxy role like this:
ansible-galaxy install -r requirements.yml
Inside requirements.yml
# from GitHub, overriding the name and specifying a specific tag
- src: redbeard28.bashaliases
More info => Ansible Docs
Requirements
- Ansible 2.9+
Role Variables
---
activate_shell_aliases_extra: false
aliases_shell: "bash"
shell_rc_file: "~/.{{ aliases_shell }}rc"
shell_aliases_file: "~/.{{ aliases_shell }}_aliases"
shell_aliases:
- {alias: "ll", command: "ls -rthl --color=auto"}
- {alias: "dir", command: "dir --color=auto"}
- {alias: "grep", command: "grep --color=auto"}
shell_aliases_extra:
- \#function inspec { docker run -it --rm -v $(pwd):/share -v $(echo $HOME):/home/ chef/inspec "$@"; }
- export cookiecutterURL=https://github.com/redbeard28/ansible-role-template.git
Dependencies
if python3 is not installed on remote host
- src: redbeard28.bootstrap
Example Playbook
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: all
roles:
- { role: redbeard28.bashaliases, tags: mytags }
Molecule testing framework
You can use molecule to test this role.
image=debian tag="buster" molecule converge
image=debian tag="buster" molecule verify
Author Information
Jeremie CUADRADO¹ from Redbeard-Consulting
Install
ansible-galaxy install redbeard28/ansible-role-bashaliases
License
Unknown
Downloads
214
Owner