failed_when: false
- name: enable extras repo for centos
- ini_file:
- dest: /etc/yum.repos.d/CentOS-Base.repo
- section: extras
- option: enabled
- value: 1
+ yum_repository:
+ name: extras
+ state: present
+ enabled: yes
when: ansible_distribution == 'CentOS'
tags:
with_pkg
with_pkg
# ensure extras enabled for docker
-- name: enable extras repo for centos
- ini_file:
- dest: /etc/yum.repos.d/CentOS-Base.repo
- section: extras
- option: enabled
- value: 1
- when: ansible_distribution == 'CentOS'
+- name: enable extras on centos
+ yum_repository:
+ name: extras
+ state: present
+ enabled: yes
+ when:
+ - ansible_distribution == 'CentOS'
tags:
with_pkg
with_pkg
- name: enable extras repo for centos
- ini_file:
- dest: /etc/yum.repos.d/CentOS-Base.repo
- section: extras
- option: enabled
- value: 1
+ yum_repository:
+ name: extras
+ state: present
+ enabled: yes
when: ansible_distribution == 'CentOS'
tags:
with_pkg
tags:
with_pkg
-- name: enable extras repo for centos
- ini_file:
- dest: /etc/yum.repos.d/CentOS-Base.repo
- section: extras
- option: enabled
- value: 1
- when: ansible_distribution == 'CentOS'
- tags:
- with_pkg
-
- name: install docker-engine on redhat
yum:
name: "{{ item }}"
failed_when: false
- name: enable extras repo for centos
- ini_file:
- dest: /etc/yum.repos.d/CentOS-Base.repo
- section: extras
- option: enabled
- value: 1
+ yum_repository:
+ name: extras
+ state: present
+ enabled: yes
when: ansible_distribution == 'CentOS'
tags:
with_pkg
tags:
with_pkg
-- name: enable extras repo for centos
- ini_file:
- dest: /etc/yum.repos.d/CentOS-Base.repo
- section: extras
- option: enabled
- value: 1
+- name: enable extras repo on centos
+ yum_repository:
+ name: extras
+ state: present
+ enabled: yes
when: ansible_distribution == 'CentOS'
tags:
with_pkg
tags:
with_pkg
-- name: enable extras repo for centos
- ini_file:
- dest: /etc/yum.repos.d/CentOS-Base.repo
- section: extras
- option: enabled
- value: 1
+- name: enable extras repo on centos
+ yum_repository:
+ name: extras
+ state: present
+ enabled: yes
when: ansible_distribution == 'CentOS'
tags:
with_pkg