From 4ce39bb4e900dc165f5e6186077a44d434907b40 Mon Sep 17 00:00:00 2001 From: Adrien Date: Sun, 5 Apr 2020 23:29:02 +0200 Subject: [PATCH] Update for CentOS 8 --- tasks/add_repo_RedHat.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tasks/add_repo_RedHat.yml b/tasks/add_repo_RedHat.yml index ae6ff51..9a0d37d 100644 --- a/tasks/add_repo_RedHat.yml +++ b/tasks/add_repo_RedHat.yml @@ -8,4 +8,12 @@ # mode: 0644 - name: Registering Ansible repository - copy: src=yum-ansible.repo dest=/etc/yum.repos.d/ansible.repo owner=root group=root mode=0644 + copy: + src: yum-ansible.repo + dest: /etc/yum.repos.d/ansible.repo + owner: root + group: root + mode: 0644 + when: + - "ansible_distribution == 'CentOS' or ansible_distribution == 'RedHat'" + - "ansible_distribution_major_version < '8'"