From 3a8e36e636b28e05656e20f1232a0a1c938158a7 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Wed, 27 Jun 2018 11:07:35 -0700 Subject: [PATCH] Fix Debian/RedHat setup * Change yum repository from nginx to unit * Remove apt task causing ansible to be non-idempotent --- tasks/unit/setup-debian.yml | 4 ---- tasks/unit/setup-redhat.yml | 10 +++++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/tasks/unit/setup-debian.yml b/tasks/unit/setup-debian.yml index 114fc45..8029ab5 100644 --- a/tasks/unit/setup-debian.yml +++ b/tasks/unit/setup-debian.yml @@ -5,7 +5,3 @@ with_items: - deb https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit - deb-src https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit - -- name: "(Install: Debian/Ubuntu) Update APT Cache" - apt: - update_cache: yes diff --git a/tasks/unit/setup-redhat.yml b/tasks/unit/setup-redhat.yml index a1fe14f..232c0c9 100644 --- a/tasks/unit/setup-redhat.yml +++ b/tasks/unit/setup-redhat.yml @@ -1,18 +1,18 @@ --- -- name: "(Install: RedHat) Add NGINX Unit Repository" +- name: "(Install: CentOS/RedHat) Add NGINX Unit Repository" yum_repository: - name: nginx + name: unit baseurl: https://packages.nginx.org/unit/{{ (ansible_distribution == "RedHat") | ternary('rhel/', 'centos/') }}$releasever/$basearch/ - description: NGINX Repository + description: NGINX Unit Repository enabled: yes gpgcheck: yes when: ansible_distribution != "Amazon" - name: "(Install: Amazon Linux) Add NGINX Unit Repository" yum_repository: - name: nginx + name: unit baseurl: https://packages.nginx.org/unit/amzn/$releasever/$basearch/ - description: NGINX Repository + description: NGINX Unit Repository enabled: yes gpgcheck: yes when: ansible_distribution == "Amazon"