Add possibility to override some environment variables
Add possibility to use custom 'master_environment_override'
and 'mirror_environment_override' files, to avoid sed-ing the
user-data files.
Related issue: https://mirantis.jira.com/browse/PROD-23809
Change-Id: I664a200358f98e35ceb28267dc40c4974778ba30
diff --git a/config-drive/mirror_config.yaml b/config-drive/mirror_config.yaml
index 153ef67..80c65cf 100644
--- a/config-drive/mirror_config.yaml
+++ b/config-drive/mirror_config.yaml
@@ -6,10 +6,11 @@
path: /etc/cloud/mirror_environment
permissions: '0644'
content: |
- export SALT_MASTER_DEPLOY_IP=10.1.0.14
- export APTLY_DEPLOY_IP=10.1.0.14
- export APTLY_DEPLOY_NETMASK=255.255.0.0
- export APTLY_MINION_ID=apt01.deploy-name.local
+ [ -f /etc/cloud/mirror_environment_override ] && . /etc/cloud/mirror_environment_override
+ export SALT_MASTER_DEPLOY_IP=${SALT_MASTER_DEPLOY_IP:-"10.1.0.14"}
+ export APTLY_DEPLOY_IP=${APTLY_DEPLOY_IP:-"10.1.0.14"}
+ export APTLY_DEPLOY_NETMASK=${APTLY_DEPLOY_NETMASK:-"255.255.0.0"}
+ export APTLY_MINION_ID=${APTLY_MINION_ID:-"apt01.deploy-name.local"}
mirror_config:
- &mirror_config |
function docker_ca_wa(){