diff --git a/roles/ceph-mds/tasks/docker/pre_requisite.yml b/roles/ceph-mds/tasks/docker/pre_requisite.yml index 960131121..a3ef113f3 100644 --- a/roles/ceph-mds/tasks/docker/pre_requisite.yml +++ b/roles/ceph-mds/tasks/docker/pre_requisite.yml @@ -39,11 +39,10 @@ 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 diff --git a/roles/ceph-mon/tasks/docker/pre_requisite.yml b/roles/ceph-mon/tasks/docker/pre_requisite.yml index 1e43af4e8..ec44581a3 100644 --- a/roles/ceph-mon/tasks/docker/pre_requisite.yml +++ b/roles/ceph-mon/tasks/docker/pre_requisite.yml @@ -34,13 +34,13 @@ 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 diff --git a/roles/ceph-nfs/tasks/docker/pre_requisite.yml b/roles/ceph-nfs/tasks/docker/pre_requisite.yml index 7a7b807b8..27142aa46 100644 --- a/roles/ceph-nfs/tasks/docker/pre_requisite.yml +++ b/roles/ceph-nfs/tasks/docker/pre_requisite.yml @@ -25,11 +25,10 @@ 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 diff --git a/roles/ceph-osd/tasks/docker/pre_requisite.yml b/roles/ceph-osd/tasks/docker/pre_requisite.yml index 24f87758f..ab7e21057 100644 --- a/roles/ceph-osd/tasks/docker/pre_requisite.yml +++ b/roles/ceph-osd/tasks/docker/pre_requisite.yml @@ -44,16 +44,6 @@ 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 }}" diff --git a/roles/ceph-rbd-mirror/tasks/docker/pre_requisite.yml b/roles/ceph-rbd-mirror/tasks/docker/pre_requisite.yml index 713a762d5..525140264 100644 --- a/roles/ceph-rbd-mirror/tasks/docker/pre_requisite.yml +++ b/roles/ceph-rbd-mirror/tasks/docker/pre_requisite.yml @@ -39,11 +39,10 @@ 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 diff --git a/roles/ceph-restapi/tasks/docker/pre_requisite.yml b/roles/ceph-restapi/tasks/docker/pre_requisite.yml index 29ccc0073..d004714ad 100644 --- a/roles/ceph-restapi/tasks/docker/pre_requisite.yml +++ b/roles/ceph-restapi/tasks/docker/pre_requisite.yml @@ -32,12 +32,11 @@ 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 diff --git a/roles/ceph-rgw/tasks/docker/pre_requisite.yml b/roles/ceph-rgw/tasks/docker/pre_requisite.yml index 7427b4e6f..d135a7f1d 100644 --- a/roles/ceph-rgw/tasks/docker/pre_requisite.yml +++ b/roles/ceph-rgw/tasks/docker/pre_requisite.yml @@ -32,12 +32,11 @@ 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