From 2a2a653b8301f5389e5da6c09045628d11da2a15 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 19 Feb 2020 21:28:50 +0100 Subject: [PATCH] copr-be-dev-aws: disable services for the beginning --- inventory/group_vars/copr_aws | 2 ++ inventory/group_vars/copr_dev_aws | 2 ++ inventory/host_vars/copr-be-dev-aws.fedoraproject.org | 2 ++ inventory/inventory | 10 ++++++++++ roles/copr/backend/tasks/main.yml | 1 + roles/copr/backend/tasks/resalloc.yml | 2 ++ 6 files changed, 19 insertions(+) create mode 100644 inventory/group_vars/copr_aws create mode 100644 inventory/group_vars/copr_dev_aws diff --git a/inventory/group_vars/copr_aws b/inventory/group_vars/copr_aws new file mode 100644 index 0000000000..0a5b96cd94 --- /dev/null +++ b/inventory/group_vars/copr_aws @@ -0,0 +1,2 @@ +--- +services_disabled: true diff --git a/inventory/group_vars/copr_dev_aws b/inventory/group_vars/copr_dev_aws new file mode 100644 index 0000000000..0a5b96cd94 --- /dev/null +++ b/inventory/group_vars/copr_dev_aws @@ -0,0 +1,2 @@ +--- +services_disabled: true diff --git a/inventory/host_vars/copr-be-dev-aws.fedoraproject.org b/inventory/host_vars/copr-be-dev-aws.fedoraproject.org index d8eddc9414..c3eae00fba 100644 --- a/inventory/host_vars/copr-be-dev-aws.fedoraproject.org +++ b/inventory/host_vars/copr-be-dev-aws.fedoraproject.org @@ -15,3 +15,5 @@ messaging: # Copr vars copr_hostbase: copr-be-dev _copr_be_conf: copr-be.conf-dev + +datacenter: aws diff --git a/inventory/inventory b/inventory/inventory index 7e26cc111c..46481aec7f 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -1110,6 +1110,9 @@ copr-fe.cloud.fedoraproject.org [copr_back] copr-be.cloud.fedoraproject.org +[copr_back_aws] +copr-be-aws.fedorainfracloud.org + [copr_dist_git] copr-dist-git.fedorainfracloud.org @@ -1155,9 +1158,13 @@ copr-dist-git-stg.fedorainfracloud.org [copr:children] copr_front copr_back +copr_back_aws copr_keygen copr_dist_git +[copr_aws:children] +copr_back_aws + [copr_stg:children] copr_front_stg copr_back_stg @@ -1174,6 +1181,9 @@ copr_front_dev_aws copr_keygen_dev_aws copr_dist_git_dev_aws +[copr_dev_aws:children] +copr_back_dev_aws + [copr_hypervisors_aarch64] virthost-aarch64-os01.fedorainfracloud.org virthost-aarch64-os02.fedorainfracloud.org diff --git a/roles/copr/backend/tasks/main.yml b/roles/copr/backend/tasks/main.yml index 2216756426..c67e8fed1c 100644 --- a/roles/copr/backend/tasks/main.yml +++ b/roles/copr/backend/tasks/main.yml @@ -272,6 +272,7 @@ - name: enable and run copr-backend services service: name="{{ item }}" enabled=yes state=started + when: not services_disabled|bool with_items: - redis # TODO: .service in copr-backend should depend on redis - copr-backend diff --git a/roles/copr/backend/tasks/resalloc.yml b/roles/copr/backend/tasks/resalloc.yml index 00305a2b1d..3818afd805 100644 --- a/roles/copr/backend/tasks/resalloc.yml +++ b/roles/copr/backend/tasks/resalloc.yml @@ -20,6 +20,7 @@ - name: enable PostgreSQL service service: state=started enabled=yes name=postgresql + when: not services_disabled|bool - name: Create PG user postgresql_user: name="resalloc" @@ -126,3 +127,4 @@ name: resalloc state: started enabled: yes + when: not services_disabled|bool