copr: drop 'stage' variable

Since the 'env' by design (see comments in inventory/group_vars/all) can
only contain 'production' or 'staging', we still need to have a way to
to detect 'staging' vs 'development'.

There already was 'devel' variable in copr, but it was set to 'true'
also on staging.  So let's change this.
This commit is contained in:
Pavel Raiskup 2019-09-05 12:44:04 +02:00 committed by Pierre-Yves Chibon
parent cd2b381e79
commit cc0d7c2ed2
3 changed files with 6 additions and 5 deletions

View file

@ -1,6 +1,5 @@
--- ---
devel: true devel: false
stage: true
#_forward-src: "{{ files }}/copr/forward-dev" #_forward-src: "{{ files }}/copr/forward-dev"
_forward_src: "forward_dev" _forward_src: "forward_dev"

View file

@ -1,4 +1,4 @@
{% if not devel %} {% if env == "production" %}
# Production configuration. On each aarch64 host we have # Production configuration. On each aarch64 host we have
# 2 guests VMs of # 2 guests VMs of
# - 10 VCPUs # - 10 VCPUs
@ -22,7 +22,7 @@ aarch64_02_prod:
cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-aarch64-delete" cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-aarch64-delete"
tags: tags:
- aarch64 - aarch64
{% elif stage is not defined %} {% elif devel %}
# Development configuration. On each aarch64 host we have # Development configuration. On each aarch64 host we have
# 2 guests vms of # 2 guests vms of
# - 2 VCPUs (default) # - 2 VCPUs (default)
@ -46,4 +46,6 @@ aarch64_02_dev:
cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-aarch64-delete" cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-aarch64-delete"
tags: tags:
- aarch64 - aarch64
{% else %}
# No aarch64 hosts on staging for now.
{% endif %} {% endif %}

View file

@ -1,6 +1,6 @@
# Purpose of this instance # Purpose of this instance
# Use "production", "devel", "local" or "test" # Use "production", "devel", "local" or "test"
ENV={% if devel %}"devel"{% else %}"production"{% endif %} ENV={% if devel %}"devel"{% else %}{{ env }}{% endif %}
# Directory and files where is stored Copr database files # Directory and files where is stored Copr database files
DATA_DIR = '/var/lib/copr/data' DATA_DIR = '/var/lib/copr/data'