Move files between payload folders;Define upgrade vapp properties;Join metacluster
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -1,13 +1 @@
|
||||
- block:
|
||||
|
||||
- name: Check for vCenter connectivity
|
||||
community.vmware.vmware_vcenter_settings_info:
|
||||
schema: vsphere
|
||||
register: vcenter_info
|
||||
|
||||
module_defaults:
|
||||
group/vmware:
|
||||
hostname: "{{ vapp['hv.fqdn'] }}"
|
||||
validate_certs: no
|
||||
username: "{{ vapp['hv.username'] }}"
|
||||
password: "{{ vapp['hv.password'] }}"
|
||||
- import_tasks: vcenter.yml
|
||||
|
@ -0,0 +1,13 @@
|
||||
- block:
|
||||
|
||||
- name: Check for vCenter connectivity
|
||||
community.vmware.vmware_vcenter_settings_info:
|
||||
schema: vsphere
|
||||
register: vcenter_info
|
||||
|
||||
module_defaults:
|
||||
group/vmware:
|
||||
hostname: "{{ vapp['hv.fqdn'] }}"
|
||||
validate_certs: no
|
||||
username: "{{ vapp['hv.username'] }}"
|
||||
password: "{{ vapp['hv.password'] }}"
|
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Change working directory
|
||||
pushd {{ _template.service.workingdir }}
|
||||
|
||||
# Compress *.tar files
|
||||
if tar -czf image-tarballs.tgz *.tar --remove-files; then
|
||||
# Disable systemd unit
|
||||
systemctl disable {{ _template.service.name }}
|
||||
fi
|
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description={{ _template.service.name }}
|
||||
|
||||
[Service]
|
||||
ExecStart={{ _template.service.executable }}
|
||||
Nice=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
export TERM=linux
|
||||
|
||||
BGRN='\033[1;92m'
|
||||
BGRY='\033[1;30m'
|
||||
BBLU='\033[1;34m'
|
||||
BRED='\033[1;91m'
|
||||
BWHI='\033[1;97m'
|
||||
CBLA='\033[?16;0;30c' # Hide blinking cursor
|
||||
DFLT='\033[0m' # Reset colour
|
||||
LCLR='\033[K' # Clear to end of line
|
||||
PRST='\033[0;0H' # Reset cursor position
|
||||
|
||||
# COMPONENTS=('ca' 'ingress' 'storage' 'registry' 'git' 'gitops')
|
||||
COMPONENTS=('ca' 'storage' 'registry' 'git' 'gitops')
|
||||
FQDN='{{ vapp['metacluster.fqdn'] }}'
|
||||
IPADDRESS='{{ vapp['guestinfo.ipaddress'] }}'
|
||||
|
||||
I=60
|
||||
|
||||
while /bin/true; do
|
||||
if [[ $I -gt 59 ]]; then
|
||||
clear > /dev/tty1
|
||||
I=0
|
||||
else
|
||||
I=$(( $I + 1 ))
|
||||
fi
|
||||
|
||||
echo -e "${PRST}" > /dev/tty1
|
||||
echo -e "\n\n\t${DFLT}To manage this appliance, please connect to one of the following:${LCLR}\n" > /dev/tty1
|
||||
|
||||
for c in "${COMPONENTS[@]}"; do
|
||||
STATUS=$(curl -ks "https://${c}.${FQDN}" -o /dev/null -w '%{http_code}')
|
||||
|
||||
if [[ "${STATUS}" -eq "200" ]]; then
|
||||
echo -e "\t [${BGRN}+${DFLT}] ${BBLU}https://${c}.${FQDN}${DFLT}${LCLR}" > /dev/tty1
|
||||
else
|
||||
echo -e "\t [${BRED}-${DFLT}] ${BBLU}https://${c}.${FQDN}${DFLT}${LCLR}" > /dev/tty1
|
||||
fi
|
||||
done
|
||||
|
||||
echo -e "\n\t${BGRY}Note that your DNS zone ${DFLT}must have${BGRY} respective records defined,\n\teach pointing to: ${DFLT}${IPADDRESS}${LCLR}" > /dev/tty1
|
||||
|
||||
echo -e "${CBLA}" > /dev/tty1
|
||||
sleep 1
|
||||
done
|
Reference in New Issue
Block a user