geerlingguy.ansible

Ansible Role: Ansible

CI

This is an Ansible Role that installs Ansible on Linux servers.

Requirements

If you're using this on a RedHat, CentOS, or Rocky Linux-based system, make sure to add the EPEL repository. You can easily add this by including the geerlingguy.repo-epel role from Ansible Galaxy.

Role Variables

Here are the variables you can use, along with their default values (see defaults/main.yml):

  • ansible_install_method: package

    This decides how Ansible will be installed: either through the system’s package manager (apt, yum, dnf, etc.) or via pip. If you choose pip, ensure that Pip is installed before using this role. You can install Pip using the geerlingguy.pip module.

  • ansible_install_version_pip: ''

    If you set ansible_install_method to pip, this variable allows you to specify the exact version of Ansible you want to install. If left empty, the latest version will be installed.

  • ansible_install_pip_extra_args: ''

    If you're using pip, you can add extra arguments for pip here. If left empty, no extra arguments will be used.

  • ansible_pip_executable: ''

    If using pip, specify the path to the pip executable here, in case your system has a different name for it.

  • ansible_epel_repo_name: 'epel'

    If you're using package on a RHEL system, and your local server administrators have named the EPEL repository something other than "epel," you can enter the correct name here.

Dependencies

None.

Example Playbook

To install using the system package manager:

- hosts: servers
  roles:
    - role: geerlingguy.ansible

To install using pip:

- hosts: servers
  vars:
    ansible_install_method: pip
    ansible_install_version_pip: "8.6.0"
    ansible_install_pip_extra_args: "--user"
  roles:
    - role: geerlingguy.pip
    - role: geerlingguy.ansible

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, who is the author of Ansible for DevOps.

Informazioni sul progetto

Ansible for RedHat/CentOS/Debian/Ubuntu.

Installa
ansible-galaxy install geerlingguy.ansible
Licenza
mit
Download
972.2k
Proprietario
Father, author, developer, maker. Sometimes called "an inflammatory enigma". #stl #drupal #ansible #k8s #raspberrypi #crohns