On Fri, Feb 14, 2020 at 02:53:49PM +0100, Miroslav Suchý wrote: > I am deploying Copr machines in AWS from our ansible.git and I just learned that > https://infrastructure.fedoraproject.org/pub/fedora/linux/ > is not reachable from AWS. Yeah, there's a specific allow list for it (since we don't want to serve out RHEL content). > I took the initiative and added new semantic to variable 'datacenter'. > When it is set to > datacenter=aws > then base role does not modify fedora*.repo > > It is probably needed for centos and other, but I needed just this. That sounds fine. Should work great for fedora instances in aws. I don't think we have any plans to run rhel instances there using our repos. kevin -- > > Miroslav > > -------- Přeposlaná zpráva -------- > Předmět: [ansible] do not modify fedora*.repo when deploying in AWS > Datum: Fri, 14 Feb 2020 13:27:04 +0000 (UTC) > Od: Miroslav Suchý <msuchy@xxxxxxxxxxxxxxxxx> > Komu: sysadmin-members@xxxxxxxxxxxxxxxxx > > commit 034810b13164ab68b93a6aa941ec0ceb1ac2e7a1 > Author: Miroslav Suchý <msuchy@xxxxxxxxxx> > Date: Fri Feb 14 14:26:31 2020 +0100 > > 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 c0b99b8..f0f7d91 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 fa64bb6..b7ef54b 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 > _______________________________________________ > infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx > To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx > Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ infrastructure mailing list -- infrastructure@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to infrastructure-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx