From d2ce8afd46975e9506524f6deefd15e00cedbdac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Fri, 14 Feb 2020 14:26:31 +0100 Subject: [PATCH] do not modify fedora*.repo when deploying in AWS --- inventory/host_vars/18.215.229.156 | 1 + tasks/yumrepos.yml | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/inventory/host_vars/18.215.229.156 b/inventory/host_vars/18.215.229.156 index c0b99b84f9..f0f7d91e87 100644 --- a/inventory/host_vars/18.215.229.156 +++ b/inventory/host_vars/18.215.229.156 @@ -2,6 +2,7 @@ ansible_ssh_user: fedora ansible_become_user: root ansible_become: yes +datacenter: aws #instance_type: t3a.small #image: "{{ fedora31_x86_64 }}" #keypair: fedora-admin-20130801 diff --git a/tasks/yumrepos.yml b/tasks/yumrepos.yml index fa64bb666d..b7ef54b71b 100644 --- a/tasks/yumrepos.yml +++ b/tasks/yumrepos.yml @@ -54,7 +54,7 @@ - fedora.repo - fedora-updates.repo - fedora-updates-testing.repo - when: ansible_distribution == 'Fedora' and not inventory_hostname.startswith(('buildvm-s390x', 'buildvm-ppc64le')) and not inventory_hostname.startswith('rawhide-test') + when: ansible_distribution == 'Fedora' and not inventory_hostname.startswith(('buildvm-s390x', 'buildvm-ppc64le')) and not inventory_hostname.startswith('rawhide-test') and datacenter != "aws" tags: - config - packages @@ -66,7 +66,7 @@ - fedora-modular.repo - fedora-updates-modular.repo - fedora-updates-testing-modular.repo - when: ansible_distribution == 'Fedora' and not inventory_hostname.startswith('rawhide-test') and not inventory_hostname.startswith(('buildvm-s390x', 'buildvm-ppc64le')) + when: ansible_distribution == 'Fedora' and not inventory_hostname.startswith('rawhide-test') and not inventory_hostname.startswith(('buildvm-s390x', 'buildvm-ppc64le')) and datacenter != "aws" tags: - config - packages @@ -78,7 +78,7 @@ - fedora.repo - fedora-updates.repo - fedora-updates-testing.repo - when: ansible_distribution == 'Fedora' and (ansible_architecture == 'ppc64' or ansible_architecture == 'ppc64le' or ansible_architecture == 's390x') + when: ansible_distribution == 'Fedora' and (ansible_architecture == 'ppc64' or ansible_architecture == 'ppc64le' or ansible_architecture == 's390x') and datacenter != "aws" tags: - config - packages @@ -90,7 +90,7 @@ - fedora-modular.repo - fedora-updates-modular.repo - fedora-updates-testing-modular.repo - when: ansible_distribution == 'Fedora' and ansible_distribution_major_version >= 29 and (ansible_architecture == 'ppc64le' or ansible_architecture == 's390x') + when: ansible_distribution == 'Fedora' and ansible_distribution_major_version >= 29 and (ansible_architecture == 'ppc64le' or ansible_architecture == 's390x') and datacenter != "aws" tags: - config - packages