From a6d54c858e542a93ca11a20cbb44e39c80cb679a Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Tue, 26 Jun 2018 16:26:24 -0700 Subject: [PATCH] Merge CentOS and RedHat tasks --- tasks/unit/setup-redhat.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tasks/unit/setup-redhat.yml b/tasks/unit/setup-redhat.yml index 05e6c6f..a1fe14f 100644 --- a/tasks/unit/setup-redhat.yml +++ b/tasks/unit/setup-redhat.yml @@ -2,20 +2,11 @@ - name: "(Install: RedHat) Add NGINX Unit Repository" yum_repository: name: nginx - baseurl: https://packages.nginx.org/unit/rhel/$releasever/$basearch/ + baseurl: https://packages.nginx.org/unit/{{ (ansible_distribution == "RedHat") | ternary('rhel/', 'centos/') }}$releasever/$basearch/ description: NGINX Repository enabled: yes gpgcheck: yes - when: ansible_distribution == "RedHat" - -- name: "(Install: CentOS) Add NGINX Unit Repository" - yum_repository: - name: nginx - baseurl: https://packages.nginx.org/unit/centos/$releasever/$basearch/ - description: NGINX Repository - enabled: yes - gpgcheck: yes - when: ansible_distribution == "CentOS" + when: ansible_distribution != "Amazon" - name: "(Install: Amazon Linux) Add NGINX Unit Repository" yum_repository: