julb.shell_aliases

Shell Aliases

This role helps to install shell aliases globally on a system.

Requirements

No special requirements needed.

Role Variables

Name Type Location Description
shell_aliases_shell_files string[] defaults/main.yml The locations of the shell files where aliases will be written. By default, this is /etc/profile.d/custom-aliases.sh and /etc/profile.d/custom-aliases.csh.
shell_aliases aliases[] defaults/main.yml The aliases that will be created on the target system. See below for the default list.
shell_aliases_extras aliases[] defaults/main.yml An additional object for aliases to keep the default ones and allow you to add your own. Defaults to [].

The shell_aliases and shell_aliases_extras are lists of aliases objects. Each object has a name attribute (for the alias name) and a command attribute (for the command to run).

By default, the following aliases are provided in shell_aliases:

- name: c
  command: "clear"
- name: untar
  command: "tar -xvf"
- name: untarz
  command: "tar -zxvf"
- name: ping
  command: "ping -c 5"
- name: ll
  command: "ls -al"
- name: hrep
  command: "history | grep"

Dependencies

No dependencies required.

Example Playbook

Here’s an example of how to use this role (for instance, with variables passed as parameters):

- hosts: servers
  roles:
    - { role: julb.shell_aliases }

License

MIT License.

Author Information

You can find more about me on my GitHub.

Contributing

This project is fully open source, and contributions are welcome.

When you submit a pull request (PR), please make sure to check the syntax.

Informazioni sul progetto

A role which installs shell aliases globally on a system.

Installa
ansible-galaxy install julb.shell_aliases
Licenza
mit
Download
312
Proprietario