mirror of
https://github.com/geerlingguy/ansible-role-ansible.git
synced 2024-11-25 12:05:11 +01:00
Make role work correctly on CentOS 8 and simplify apt repos.
This commit is contained in:
parent
cc3093948d
commit
25a7bf99f4
10
.travis.yml
10
.travis.yml
@ -6,12 +6,12 @@ env:
|
||||
global:
|
||||
- ROLE_NAME: ansible
|
||||
matrix:
|
||||
- MOLECULE_DISTRO: centos7
|
||||
- MOLECULE_DISTRO: fedora29
|
||||
- MOLECULE_DISTRO: ubuntu1804
|
||||
- MOLECULE_DISTRO: debian9
|
||||
- MOLECULE_DISTRO: centos8
|
||||
- MOLECULE_DISTRO: fedora32
|
||||
- MOLECULE_DISTRO: ubuntu2004
|
||||
- MOLECULE_DISTRO: debian10
|
||||
|
||||
- MOLECULE_DISTRO: centos7
|
||||
- MOLECULE_DISTRO: centos8
|
||||
MOLECULE_PLAYBOOK: playbook-pip.yml
|
||||
|
||||
install:
|
||||
|
@ -10,8 +10,7 @@ galaxy_info:
|
||||
platforms:
|
||||
- name: EL
|
||||
versions:
|
||||
- 6
|
||||
- 7
|
||||
- all
|
||||
- name: Fedora
|
||||
versions:
|
||||
- all
|
||||
|
@ -9,18 +9,25 @@
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_distribution != 'Fedora'
|
||||
- ansible_install_method == 'package'
|
||||
|
||||
- name: Set up Ansible on Fedora.
|
||||
include_tasks: setup-Fedora.yml
|
||||
when: ansible_distribution == 'Fedora'
|
||||
when:
|
||||
- ansible_distribution == 'Fedora'
|
||||
- ansible_install_method == 'package'
|
||||
|
||||
- name: Set up Ansible on Ubuntu.
|
||||
include_tasks: setup-Ubuntu.yml
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
when:
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
- ansible_install_method == 'package'
|
||||
|
||||
- name: Set up Ansible on Debian.
|
||||
include_tasks: setup-Debian.yml
|
||||
when: ansible_distribution == 'Debian'
|
||||
when:
|
||||
- ansible_distribution == 'Debian'
|
||||
- ansible_install_method == 'package'
|
||||
|
||||
- name: Set up Ansible using Pip.
|
||||
include_tasks: setup-pip.yml
|
||||
|
@ -6,11 +6,9 @@
|
||||
{{ ansible_distribution_release }}-backports main'
|
||||
state: present
|
||||
filename: "{{ ansible_distribution_release }}_backports"
|
||||
update_cache: true
|
||||
when: ansible_distribution_version | int < 9
|
||||
|
||||
- name: Update apt cache.
|
||||
apt: update_cache=true cache_valid_time=86400
|
||||
|
||||
- name: Set the default_release option for older Debian versions.
|
||||
set_fact:
|
||||
ansible_default_release: "{{ ansible_distribution_release }}-backports"
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- name: Install Ansible.
|
||||
yum:
|
||||
package:
|
||||
name: ansible
|
||||
state: "{{ ansible_package_state }}"
|
||||
enablerepo: epel
|
||||
|
@ -5,10 +5,9 @@
|
||||
state: present
|
||||
|
||||
- name: Add ansible repository.
|
||||
apt_repository: repo='ppa:ansible/ansible'
|
||||
|
||||
- name: Update apt cache.
|
||||
apt: update_cache=true cache_valid_time=86400
|
||||
apt_repository:
|
||||
repo: 'ppa:ansible/ansible'
|
||||
update_cache: true
|
||||
|
||||
- name: Install Ansible.
|
||||
apt:
|
||||
|
Loading…
Reference in New Issue
Block a user