41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
---
|
|
|
|
- name: Verifica abilitazione repo Extra
|
|
shell: yum repolist
|
|
register: check_epel
|
|
failed_when: "'Extra Packages for Enterprise Linux 6' not in check_epel.stdout"
|
|
ignore_errors: yes
|
|
|
|
- name: Installo epel-release
|
|
yum: name=epel-release state=present
|
|
sudo: yes
|
|
when: check_epel|success
|
|
register: epel_installed
|
|
|
|
- name: Installo epel-release da URL
|
|
yum:
|
|
name: "http://dl.fedoraproject.org/pub/epel/6/{{ ansible_architecture }}/epel-release-6-8.noarch.rpm"
|
|
state: present
|
|
sudo: yes
|
|
when: check_epel|failed
|
|
register: rpm_epel_installed
|
|
|
|
- name: Abilito il repo EPEL
|
|
shell: yum-config-manager --enable epel
|
|
sudo: yes
|
|
when: epel_installed|success or rpm_epel_installed|success
|
|
changed_when: epel_enabled.rc == 0
|
|
register: epel_enabled
|
|
|
|
- name: Pulizia e ricaricam. repo
|
|
shell: yum clean all && yum repolist
|
|
sudo: yes
|
|
when: epel_enabled|success
|
|
tags: repo
|
|
|
|
- name: Installo pacchetti addizionali
|
|
yum: name={{ item }} state=present
|
|
sudo: yes
|
|
with_items: addin_pkgs
|
|
tags: pkg
|