From: Frank Brehm Date: Tue, 5 Jul 2022 14:29:34 +0000 (+0200) Subject: Start refactoring .gitlab-ci.yml X-Git-Tag: 2.6.2~1^2~8^2~5 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=27cd8c218cb2785069fa728519da3d23a143eb7e;p=pixelpark%2Fcreate-vmware-tpl.git Start refactoring .gitlab-ci.yml --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c629b7..191c49f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,8 @@ stages: - test - linter - - deploy + - build-el8 + - build-el7 variables: OS_ID: centos7 @@ -25,7 +26,7 @@ variables: VSPHERE_VM_FOLDER: 'templates' MAX_NR_TEMPLATES_STAY: 4 VMWARE_CONFIG_VERSION: 'vmx-15' - VM_OS_VERSION: 'oracleLinux7_64Guest' + VM_OS_VERSION: 'centos8_64Guest' VM_DISK_SIZE_GB: 20 VM_NUM_CPUS: 2 VM_RAM_MB: 4096 @@ -39,19 +40,30 @@ variables: LANG: $JOB_LANGUAGE LC_ALL: $JOB_LANGUAGE SYSTEM_STATUS: 'unknown' - CONFIG_FILE: 'etc/create.ini' + CONFIG_FILE: 'etc/create-vmware-template.ini' ROOT_PASSWORD: 'blablub' - SWAP_SPACE_MB: 4096 - COBBLER_DISTRO: 'CentOS-8.2-x86_64' - COBBLER_HOST: 'cobbler.pixelpark.com' - COBBLER_SSH_USER: 'root' + SWAP_SPACE_MB: 512 + COBBLER_DISTRO: 'CentOS-Stream-8-x86_64' + COBBLER_HOST: '' + COBBLER_HOST_PROD: 'cobbler.pixelpark.com' + COBBLER_HOST_TEST: 'test-cobbler01.pixelpark.com' + COBBLER_SSH_USER: '' + COBBLER_SSH_USER_PROD: 'root' + COBBLER_SSH_USER_TEST: 'cobbler' COBBLER_SSH_TIMEOUT: 30 COBBLER_DNS_SERVERS: '93.188.109.11, 93.188.109.12, 93.188.109.13' COBBLER_DNS_SEARCH: 'pixelpark.net, pixelpark.com, pixelpark.de' COBBLER_ROOT_DIR: '/var/lib/cobbler' + COBBLER_TEMPLATES_DIR: '' + COBBLER_TEMPLATES_DIR_PROD: 'kickstarts' + COBBLER_TEMPLATES_DIR_TEST: 'templates' + COBBLER_SNIPPETS_DIR: 'snippets' COBBLER_WS_DOCROOT: '/var/www/html' + COBBLE_NETWORK: '' + COBBLE_NETWORK_PROD: '192.168.88.0_23' + COBBLE_NETWORK_TEST: '192.168.145.0_24' -.template_job: &job_definition +.template_job: before_script: - hostname -f - whoami @@ -60,14 +72,23 @@ variables: - echo; locale -a; echo; locale # - exit 5 - if [ ! -d venv ] ; then virtualenv --python=python3.6 venv; else true; fi + - cp -v etc/cobbler-distros.yaml.default etc/cobbler-distros.yaml - source venv/bin/activate - pip install --upgrade --upgrade-strategy eager pip - pip install --upgrade --upgrade-strategy eager setuptools wheel six - pip install --upgrade --upgrade-strategy eager --requirement requirements.txt - pip list --format columns - if [ -x bin/compile-xlate-msgs.sh ] ; then bin/compile-xlate-msgs.sh; fi + - 'COBBLER_HOST="${COBBLER_HOST_TEST}"' + - 'COBBLER_SSH_USER="${COBBLER_SSH_USER_TEST}"' + - 'COBBLER_NETWORK="${COBBLER_NETWORK_TEST}"' + - 'COBBLER_TEMPLATES_DIR="${COBBLER_TEMPLATES_DIR_TEST}"' - ' if [ "$CI_COMMIT_REF_NAME" = "master" -o "$CI_COMMIT_REF_NAME" = "production" ] ; then SYSTEM_STATUS="production"; + COBBLER_HOST="${COBBLER_HOST_PROD}"; + COBBLER_SSH_USER="${COBBLER_SSH_USER_TEST}"; + COBBLER_NETWORK="${COBBLER_NETWORK_PROD}"; + COBBLER_TEMPLATES_DIR="${COBBLER_TEMPLATES_DIR_PROD}"; elif [ "$CI_COMMIT_REF_NAME" = "test" -o "$CI_COMMIT_REF_NAME" = "testing" ] ; then SYSTEM_STATUS="testing"; else @@ -102,7 +123,6 @@ variables: VSPHERE_STORAGE_CLUSTER="Daten-Cluster-Gold_01"; fi fi' - - 'CONFIG_FILE=etc/create-${OS_ID}-${SYSTEM_STATUS}.ini' - 'echo "Configuration file: \"${CONFIG_FILE}\""' - 'touch "${CONFIG_FILE}"' - 'echo "Finished common part"' @@ -116,15 +136,15 @@ variables: else SYSTEM_STATUS="development"; fi' - - 'CONFIG_FILE=etc/create-${OS_ID}-${SYSTEM_STATUS}.ini' - 'ls -l "${CONFIG_FILE}" || true' - 'rm -fv "${CONFIG_FILE}"' Test source: - <<: *job_definition + extends: + - .template_job stage: test variables: - OS_ID: centos8 + OS_ID: centos-stream-8 script: - hostname -f - whoami @@ -141,7 +161,8 @@ Test source: - tags Linter: - <<: *job_definition + extends: + - .template_job stage: linter needs: - 'Test source' @@ -156,15 +177,7 @@ Linter: - /^hf.*$/ - tags -Create Centos8 template: - <<: *job_definition - stage: deploy - needs: - - 'Linter' - variables: - OS_ID: centos8 - VM_OS_VERSION: 'centos8_64Guest' - COBBLER_DISTRO: 'CentOS-8-Stream-x86_64' +.build-job: script: - hostname -f - whoami @@ -202,6 +215,8 @@ Create Centos8 template: - 'echo "ssh_timeout = ${COBBLER_SSH_TIMEOUT}" >> "${CONFIG_FILE}"' - 'echo "distro = ${COBBLER_DISTRO}" >> "${CONFIG_FILE}"' - 'echo "root_dir = ${COBBLER_ROOT_DIR}" >> "${CONFIG_FILE}"' + - 'echo "templates_dir = ${COBBLER_TEMPLATES_DIR}" >> "${CONFIG_FILE}"' + - 'echo "snippets_dir = ${COBBLER_SNIPPETS_DIR}" >> "${CONFIG_FILE}"' - 'echo "webserver_docroot = ${COBBLER_WS_DOCROOT}" >> "${CONFIG_FILE}"' - 'echo "nameservers = ${COBBLER_DNS_SERVERS}" >> "${CONFIG_FILE}"' - 'echo "dns_search = ${COBBLER_DNS_SEARCH}" >> "${CONFIG_FILE}"' @@ -220,82 +235,19 @@ Create Centos8 template: cat "${CONFIG_FILE}" | sed -e "s/^\(root_password\) .*/\1 = ********/" -e "s/^\(password\) .*/\1 = ********/"; echo "<-- EOF"' # - bin/waitfor 1200 - - bin/create-vmware-template --verbose --color yes --config "${CONFIG_FILE}" - environment: - name: ${SYSTEM_STATUS} - except: - - /^dev-.*$/ - - /^dev\/.*$/ - - /^hf.*$/ - - tags - only: - - schedules + # - bin/create-vmware-template --verbose --color yes --config "${CONFIG_FILE}" -Create Centos7 template: - <<: *job_definition - stage: deploy +Create Centos8 template: + extends: + - .template_job + - .build-job + stage: build-el8 needs: - - 'Create Centos8 template' + - 'Linter' variables: - OS_ID: centos7 - VM_OS_VERSION: 'centos7_64Guest' - COBBLER_DISTRO: 'CentOS-7.9-x86_64' - script: - - hostname -f - - whoami - - pwd - - which python3 - - 'echo "Environment:"; env | sed -e "s/^ROOT_PASSWORD=.*/ROOT_PASSWORD=********/" | sort -i -f; echo' - - 'echo "Ref name: ${CI_COMMIT_REF_NAME}"; echo "System status: ${SYSTEM_STATUS}"' - - 'echo "Configuration file: \"${CONFIG_FILE}\""' - - 'cp -v /dev/null "${CONFIG_FILE}"' - - 'echo "[vSphere]" > "${CONFIG_FILE}"' - - 'echo "host = ${VSPHERE_HOST}" >> "${CONFIG_FILE}"' - - 'echo "port = ${VSPHERE_API_PORT}" >> "${CONFIG_FILE}"' - - 'echo "user = ${VSPHERE_API_USER}" >> "${CONFIG_FILE}"' - - 'echo "password = ${VSPHERE_API_PASSWD_PROD}" >> "${CONFIG_FILE}"' - - 'echo "dc = ${VSPHERE_DC}" >> "${CONFIG_FILE}"' - - 'echo "cluster = ${VSPHERE_CLUSTER}" >> "${CONFIG_FILE}"' - - 'echo "folder = ${VSPHERE_VM_FOLDER}" >> "${CONFIG_FILE}"' - - 'echo "storage_cluster = ${VSPHERE_STORAGE_CLUSTER}" >> "${CONFIG_FILE}"' - - 'echo "max_nr_templates_stay = ${MAX_NR_TEMPLATES_STAY}" >> "${CONFIG_FILE}"' - - 'echo "" >> "${CONFIG_FILE}"' - - 'echo "[Template]" >> "${CONFIG_FILE}"' - - 'echo "os_id = ${OS_ID}" >> "${CONFIG_FILE}"' - - 'echo "vmware_cfg_version = ${VMWARE_CONFIG_VERSION}" >> "${CONFIG_FILE}"' - - 'echo "os_version = ${VM_OS_VERSION}" >> "${CONFIG_FILE}"' - - 'echo "swap_space_mb = ${SWAP_SPACE_MB}" >> "${CONFIG_FILE}"' - - 'echo "data_size_gb = ${VM_DISK_SIZE_GB}" >> "${CONFIG_FILE}"' - - 'echo "num_cpus = ${VM_NUM_CPUS}" >> "${CONFIG_FILE}"' - - 'echo "ram_mb = ${VM_RAM_MB}" >> "${CONFIG_FILE}"' - - 'echo "network = ${VM_NETWORK}" >> "${CONFIG_FILE}"' - - 'echo "root_password = ${ROOT_PASSWORD}" >> "${CONFIG_FILE}"' - - 'echo "" >> "${CONFIG_FILE}"' - - 'echo "[Cobbler]" >> "${CONFIG_FILE}"' - - 'echo "host = ${COBBLER_HOST}" >> "${CONFIG_FILE}"' - - 'echo "ssh_user = ${COBBLER_SSH_USER}" >> "${CONFIG_FILE}"' - - 'echo "ssh_timeout = ${COBBLER_SSH_TIMEOUT}" >> "${CONFIG_FILE}"' - - 'echo "distro = ${COBBLER_DISTRO}" >> "${CONFIG_FILE}"' - - 'echo "root_dir = ${COBBLER_ROOT_DIR}" >> "${CONFIG_FILE}"' - - 'echo "webserver_docroot = ${COBBLER_WS_DOCROOT}" >> "${CONFIG_FILE}"' - - 'echo "nameservers = ${COBBLER_DNS_SERVERS}" >> "${CONFIG_FILE}"' - - 'echo "dns_search = ${COBBLER_DNS_SEARCH}" >> "${CONFIG_FILE}"' - - 'echo "system_status = ${SYSTEM_STATUS}" >> "${CONFIG_FILE}"' - - 'echo "" >> "${CONFIG_FILE}"' - - 'echo "[Timeouts]" >> "${CONFIG_FILE}"' - - 'echo "max_wait_for_general = ${MAX_WAIT_GENERAL}" >> "${CONFIG_FILE}"' - - 'echo "max_wait_for_shutdown_vm = ${MAX_WAIT_SHUTDOWN}" >> "${CONFIG_FILE}"' - - 'echo "max_wait_for_finish_install = ${MAX_WAIT_FOR_FINISH_INSTALL}" >> "${CONFIG_FILE}"' - - 'echo "" >> "${CONFIG_FILE}"' - - 'echo "; vim: filetype=dosini" >> "${CONFIG_FILE}"' - - 'echo "Generated ${CONFIG_FILE}:"; - ls -l "${CONFIG_FILE}" || true; - echo; - echo "-->"; - cat "${CONFIG_FILE}" | sed -e "s/^\(root_password\) .*/\1 = ********/" -e "s/^\(password\) .*/\1 = ********/"; - echo "<-- EOF"' - # - bin/waitfor 600 - - bin/create-vmware-template --verbose --color yes --config "${CONFIG_FILE}" + OS_ID: centos-stream-8 + VM_OS_VERSION: 'centos8_64Guest' + COBBLER_DISTRO: 'CentOS-8-Stream-x86_64' environment: name: ${SYSTEM_STATUS} except: @@ -303,82 +255,159 @@ Create Centos7 template: - /^dev\/.*$/ - /^hf.*$/ - tags - only: - - schedules +# only: +# - schedules -Create OracleLinux7 template: - <<: *job_definition - stage: deploy - needs: - - 'Create Centos7 template' - variables: - OS_ID: oel7 - VM_OS_VERSION: 'oracleLinux7_64Guest' - COBBLER_DISTRO: 'Oracle-Linux-7.8-x86_64' - script: - - hostname -f - - whoami - - pwd - - which python3 - - 'echo "Environment:"; env | sed -e "s/^ROOT_PASSWORD=.*/ROOT_PASSWORD=********/" | sort -i -f; echo' - - 'echo "Ref name: ${CI_COMMIT_REF_NAME}"; echo "System status: ${SYSTEM_STATUS}"' - - 'echo "Configuration file: \"${CONFIG_FILE}\""' - - 'cp -v /dev/null "${CONFIG_FILE}"' - - 'echo "[vSphere]" > "${CONFIG_FILE}"' - - 'echo "host = ${VSPHERE_HOST}" >> "${CONFIG_FILE}"' - - 'echo "port = ${VSPHERE_API_PORT}" >> "${CONFIG_FILE}"' - - 'echo "user = ${VSPHERE_API_USER}" >> "${CONFIG_FILE}"' - - 'echo "password = ${VSPHERE_API_PASSWD_PROD}" >> "${CONFIG_FILE}"' - - 'echo "dc = ${VSPHERE_DC}" >> "${CONFIG_FILE}"' - - 'echo "cluster = ${VSPHERE_CLUSTER}" >> "${CONFIG_FILE}"' - - 'echo "folder = ${VSPHERE_VM_FOLDER}" >> "${CONFIG_FILE}"' - - 'echo "storage_cluster = ${VSPHERE_STORAGE_CLUSTER}" >> "${CONFIG_FILE}"' - - 'echo "max_nr_templates_stay = ${MAX_NR_TEMPLATES_STAY}" >> "${CONFIG_FILE}"' - - 'echo "" >> "${CONFIG_FILE}"' - - 'echo "[Template]" >> "${CONFIG_FILE}"' - - 'echo "os_id = ${OS_ID}" >> "${CONFIG_FILE}"' - - 'echo "vmware_cfg_version = ${VMWARE_CONFIG_VERSION}" >> "${CONFIG_FILE}"' - - 'echo "os_version = ${VM_OS_VERSION}" >> "${CONFIG_FILE}"' - - 'echo "swap_space_mb = ${SWAP_SPACE_MB}" >> "${CONFIG_FILE}"' - - 'echo "data_size_gb = ${VM_DISK_SIZE_GB}" >> "${CONFIG_FILE}"' - - 'echo "num_cpus = ${VM_NUM_CPUS}" >> "${CONFIG_FILE}"' - - 'echo "ram_mb = ${VM_RAM_MB}" >> "${CONFIG_FILE}"' - - 'echo "network = ${VM_NETWORK}" >> "${CONFIG_FILE}"' - - 'echo "root_password = ${ROOT_PASSWORD}" >> "${CONFIG_FILE}"' - - 'echo "" >> "${CONFIG_FILE}"' - - 'echo "[Cobbler]" >> "${CONFIG_FILE}"' - - 'echo "host = ${COBBLER_HOST}" >> "${CONFIG_FILE}"' - - 'echo "ssh_user = ${COBBLER_SSH_USER}" >> "${CONFIG_FILE}"' - - 'echo "ssh_timeout = ${COBBLER_SSH_TIMEOUT}" >> "${CONFIG_FILE}"' - - 'echo "distro = ${COBBLER_DISTRO}" >> "${CONFIG_FILE}"' - - 'echo "root_dir = ${COBBLER_ROOT_DIR}" >> "${CONFIG_FILE}"' - - 'echo "webserver_docroot = ${COBBLER_WS_DOCROOT}" >> "${CONFIG_FILE}"' - - 'echo "nameservers = ${COBBLER_DNS_SERVERS}" >> "${CONFIG_FILE}"' - - 'echo "dns_search = ${COBBLER_DNS_SEARCH}" >> "${CONFIG_FILE}"' - - 'echo "system_status = ${SYSTEM_STATUS}" >> "${CONFIG_FILE}"' - - 'echo "" >> "${CONFIG_FILE}"' - - 'echo "[Timeouts]" >> "${CONFIG_FILE}"' - - 'echo "max_wait_for_general = ${MAX_WAIT_GENERAL}" >> "${CONFIG_FILE}"' - - 'echo "max_wait_for_shutdown_vm = ${MAX_WAIT_SHUTDOWN}" >> "${CONFIG_FILE}"' - - 'echo "max_wait_for_finish_install = ${MAX_WAIT_FOR_FINISH_INSTALL}" >> "${CONFIG_FILE}"' - - 'echo "" >> "${CONFIG_FILE}"' - - 'echo "; vim: filetype=dosini" >> "${CONFIG_FILE}"' - - 'echo "Generated ${CONFIG_FILE}:"; - ls -l "${CONFIG_FILE}" || true; - echo; - echo "-->"; - cat "${CONFIG_FILE}" | sed -e "s/^\(root_password\) .*/\1 = ********/" -e "s/^\(password\) .*/\1 = ********/"; - echo "<-- EOF"' - - bin/create-vmware-template --verbose --color yes --config "${CONFIG_FILE}" - environment: - name: ${SYSTEM_STATUS} - except: - - /^dev-.*$/ - - /^dev\/.*$/ - - /^hf.*$/ - - tags - only: - - schedules +# Create Centos7 template: +# extends: +# - .template_job +# stage: build-el7 +# needs: +# - 'Create Centos8 template' +# variables: +# OS_ID: centos7 +# VM_OS_VERSION: 'centos7_64Guest' +# COBBLER_DISTRO: 'CentOS-7.9-x86_64' +# script: +# - hostname -f +# - whoami +# - pwd +# - which python3 +# - 'echo "Environment:"; env | sed -e "s/^ROOT_PASSWORD=.*/ROOT_PASSWORD=********/" | sort -i -f; echo' +# - 'echo "Ref name: ${CI_COMMIT_REF_NAME}"; echo "System status: ${SYSTEM_STATUS}"' +# - 'echo "Configuration file: \"${CONFIG_FILE}\""' +# - 'cp -v /dev/null "${CONFIG_FILE}"' +# - 'echo "[vSphere]" > "${CONFIG_FILE}"' +# - 'echo "host = ${VSPHERE_HOST}" >> "${CONFIG_FILE}"' +# - 'echo "port = ${VSPHERE_API_PORT}" >> "${CONFIG_FILE}"' +# - 'echo "user = ${VSPHERE_API_USER}" >> "${CONFIG_FILE}"' +# - 'echo "password = ${VSPHERE_API_PASSWD_PROD}" >> "${CONFIG_FILE}"' +# - 'echo "dc = ${VSPHERE_DC}" >> "${CONFIG_FILE}"' +# - 'echo "cluster = ${VSPHERE_CLUSTER}" >> "${CONFIG_FILE}"' +# - 'echo "folder = ${VSPHERE_VM_FOLDER}" >> "${CONFIG_FILE}"' +# - 'echo "storage_cluster = ${VSPHERE_STORAGE_CLUSTER}" >> "${CONFIG_FILE}"' +# - 'echo "max_nr_templates_stay = ${MAX_NR_TEMPLATES_STAY}" >> "${CONFIG_FILE}"' +# - 'echo "" >> "${CONFIG_FILE}"' +# - 'echo "[Template]" >> "${CONFIG_FILE}"' +# - 'echo "os_id = ${OS_ID}" >> "${CONFIG_FILE}"' +# - 'echo "vmware_cfg_version = ${VMWARE_CONFIG_VERSION}" >> "${CONFIG_FILE}"' +# - 'echo "os_version = ${VM_OS_VERSION}" >> "${CONFIG_FILE}"' +# - 'echo "swap_space_mb = ${SWAP_SPACE_MB}" >> "${CONFIG_FILE}"' +# - 'echo "data_size_gb = ${VM_DISK_SIZE_GB}" >> "${CONFIG_FILE}"' +# - 'echo "num_cpus = ${VM_NUM_CPUS}" >> "${CONFIG_FILE}"' +# - 'echo "ram_mb = ${VM_RAM_MB}" >> "${CONFIG_FILE}"' +# - 'echo "network = ${VM_NETWORK}" >> "${CONFIG_FILE}"' +# - 'echo "root_password = ${ROOT_PASSWORD}" >> "${CONFIG_FILE}"' +# - 'echo "" >> "${CONFIG_FILE}"' +# - 'echo "[Cobbler]" >> "${CONFIG_FILE}"' +# - 'echo "host = ${COBBLER_HOST}" >> "${CONFIG_FILE}"' +# - 'echo "ssh_user = ${COBBLER_SSH_USER}" >> "${CONFIG_FILE}"' +# - 'echo "ssh_timeout = ${COBBLER_SSH_TIMEOUT}" >> "${CONFIG_FILE}"' +# - 'echo "distro = ${COBBLER_DISTRO}" >> "${CONFIG_FILE}"' +# - 'echo "root_dir = ${COBBLER_ROOT_DIR}" >> "${CONFIG_FILE}"' +# - 'echo "webserver_docroot = ${COBBLER_WS_DOCROOT}" >> "${CONFIG_FILE}"' +# - 'echo "nameservers = ${COBBLER_DNS_SERVERS}" >> "${CONFIG_FILE}"' +# - 'echo "dns_search = ${COBBLER_DNS_SEARCH}" >> "${CONFIG_FILE}"' +# - 'echo "system_status = ${SYSTEM_STATUS}" >> "${CONFIG_FILE}"' +# - 'echo "" >> "${CONFIG_FILE}"' +# - 'echo "[Timeouts]" >> "${CONFIG_FILE}"' +# - 'echo "max_wait_for_general = ${MAX_WAIT_GENERAL}" >> "${CONFIG_FILE}"' +# - 'echo "max_wait_for_shutdown_vm = ${MAX_WAIT_SHUTDOWN}" >> "${CONFIG_FILE}"' +# - 'echo "max_wait_for_finish_install = ${MAX_WAIT_FOR_FINISH_INSTALL}" >> "${CONFIG_FILE}"' +# - 'echo "" >> "${CONFIG_FILE}"' +# - 'echo "; vim: filetype=dosini" >> "${CONFIG_FILE}"' +# - 'echo "Generated ${CONFIG_FILE}:"; +# ls -l "${CONFIG_FILE}" || true; +# echo; +# echo "-->"; +# cat "${CONFIG_FILE}" | sed -e "s/^\(root_password\) .*/\1 = ********/" -e "s/^\(password\) .*/\1 = ********/"; +# echo "<-- EOF"' +# # - bin/waitfor 600 +# - bin/create-vmware-template --verbose --color yes --config "${CONFIG_FILE}" +# environment: +# name: ${SYSTEM_STATUS} +# except: +# - /^dev-.*$/ +# - /^dev\/.*$/ +# - /^hf.*$/ +# - tags +# only: +# - schedules + +# Create OracleLinux7 template: +# extends: +# - .template_job +# stage: build-el7 +# needs: +# - 'Create Centos7 template' +# variables: +# OS_ID: oel7 +# VM_OS_VERSION: 'oracleLinux7_64Guest' +# COBBLER_DISTRO: 'Oracle-Linux-7.8-x86_64' +# script: +# - hostname -f +# - whoami +# - pwd +# - which python3 +# - 'echo "Environment:"; env | sed -e "s/^ROOT_PASSWORD=.*/ROOT_PASSWORD=********/" | sort -i -f; echo' +# - 'echo "Ref name: ${CI_COMMIT_REF_NAME}"; echo "System status: ${SYSTEM_STATUS}"' +# - 'echo "Configuration file: \"${CONFIG_FILE}\""' +# - 'cp -v /dev/null "${CONFIG_FILE}"' +# - 'echo "[vSphere]" > "${CONFIG_FILE}"' +# - 'echo "host = ${VSPHERE_HOST}" >> "${CONFIG_FILE}"' +# - 'echo "port = ${VSPHERE_API_PORT}" >> "${CONFIG_FILE}"' +# - 'echo "user = ${VSPHERE_API_USER}" >> "${CONFIG_FILE}"' +# - 'echo "password = ${VSPHERE_API_PASSWD_PROD}" >> "${CONFIG_FILE}"' +# - 'echo "dc = ${VSPHERE_DC}" >> "${CONFIG_FILE}"' +# - 'echo "cluster = ${VSPHERE_CLUSTER}" >> "${CONFIG_FILE}"' +# - 'echo "folder = ${VSPHERE_VM_FOLDER}" >> "${CONFIG_FILE}"' +# - 'echo "storage_cluster = ${VSPHERE_STORAGE_CLUSTER}" >> "${CONFIG_FILE}"' +# - 'echo "max_nr_templates_stay = ${MAX_NR_TEMPLATES_STAY}" >> "${CONFIG_FILE}"' +# - 'echo "" >> "${CONFIG_FILE}"' +# - 'echo "[Template]" >> "${CONFIG_FILE}"' +# - 'echo "os_id = ${OS_ID}" >> "${CONFIG_FILE}"' +# - 'echo "vmware_cfg_version = ${VMWARE_CONFIG_VERSION}" >> "${CONFIG_FILE}"' +# - 'echo "os_version = ${VM_OS_VERSION}" >> "${CONFIG_FILE}"' +# - 'echo "swap_space_mb = ${SWAP_SPACE_MB}" >> "${CONFIG_FILE}"' +# - 'echo "data_size_gb = ${VM_DISK_SIZE_GB}" >> "${CONFIG_FILE}"' +# - 'echo "num_cpus = ${VM_NUM_CPUS}" >> "${CONFIG_FILE}"' +# - 'echo "ram_mb = ${VM_RAM_MB}" >> "${CONFIG_FILE}"' +# - 'echo "network = ${VM_NETWORK}" >> "${CONFIG_FILE}"' +# - 'echo "root_password = ${ROOT_PASSWORD}" >> "${CONFIG_FILE}"' +# - 'echo "" >> "${CONFIG_FILE}"' +# - 'echo "[Cobbler]" >> "${CONFIG_FILE}"' +# - 'echo "host = ${COBBLER_HOST}" >> "${CONFIG_FILE}"' +# - 'echo "ssh_user = ${COBBLER_SSH_USER}" >> "${CONFIG_FILE}"' +# - 'echo "ssh_timeout = ${COBBLER_SSH_TIMEOUT}" >> "${CONFIG_FILE}"' +# - 'echo "distro = ${COBBLER_DISTRO}" >> "${CONFIG_FILE}"' +# - 'echo "root_dir = ${COBBLER_ROOT_DIR}" >> "${CONFIG_FILE}"' +# - 'echo "webserver_docroot = ${COBBLER_WS_DOCROOT}" >> "${CONFIG_FILE}"' +# - 'echo "nameservers = ${COBBLER_DNS_SERVERS}" >> "${CONFIG_FILE}"' +# - 'echo "dns_search = ${COBBLER_DNS_SEARCH}" >> "${CONFIG_FILE}"' +# - 'echo "system_status = ${SYSTEM_STATUS}" >> "${CONFIG_FILE}"' +# - 'echo "" >> "${CONFIG_FILE}"' +# - 'echo "[Timeouts]" >> "${CONFIG_FILE}"' +# - 'echo "max_wait_for_general = ${MAX_WAIT_GENERAL}" >> "${CONFIG_FILE}"' +# - 'echo "max_wait_for_shutdown_vm = ${MAX_WAIT_SHUTDOWN}" >> "${CONFIG_FILE}"' +# - 'echo "max_wait_for_finish_install = ${MAX_WAIT_FOR_FINISH_INSTALL}" >> "${CONFIG_FILE}"' +# - 'echo "" >> "${CONFIG_FILE}"' +# - 'echo "; vim: filetype=dosini" >> "${CONFIG_FILE}"' +# - 'echo "Generated ${CONFIG_FILE}:"; +# ls -l "${CONFIG_FILE}" || true; +# echo; +# echo "-->"; +# cat "${CONFIG_FILE}" | sed -e "s/^\(root_password\) .*/\1 = ********/" -e "s/^\(password\) .*/\1 = ********/"; +# echo "<-- EOF"' +# - bin/create-vmware-template --verbose --color yes --config "${CONFIG_FILE}" +# environment: +# name: ${SYSTEM_STATUS} +# except: +# - /^dev-.*$/ +# - /^dev\/.*$/ +# - /^hf.*$/ +# - tags +# only: +# - schedules # vim: et list