Switch tty message to systemd service;Add missing kubeconfig;Refactor tty script
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
2a5a154df0
commit
62660c8d6c
@ -20,7 +20,11 @@
|
||||
loop_control:
|
||||
label: "{{ item.src }}"
|
||||
|
||||
- name: Enable tarball compression service
|
||||
- name: Enable/Start services
|
||||
ansible.builtin.systemd:
|
||||
name: compressTarballs
|
||||
name: "{{ item }}"
|
||||
enabled: yes
|
||||
state: started
|
||||
loop:
|
||||
- compressTarballs
|
||||
- ttyConsoleMessage
|
||||
|
@ -5,16 +5,24 @@
|
||||
loop:
|
||||
- /opt/firstboot
|
||||
|
||||
- name: Save tty script file
|
||||
- name: Create tty console message service
|
||||
ansible.builtin.template:
|
||||
src: tty.j2
|
||||
dest: /opt/firstboot/tty.sh
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0700
|
||||
|
||||
- name: Create @reboot crontab job
|
||||
ansible.builtin.cron:
|
||||
name: tty.consolemessage
|
||||
special_time: reboot
|
||||
job: /opt/firstboot/tty.sh
|
||||
mode: "{{ item.mode | default(omit) }}"
|
||||
vars:
|
||||
_template:
|
||||
service:
|
||||
name: ttyConsoleMessage
|
||||
executable: /opt/firstboot/tty.sh
|
||||
workingdir: /tmp/
|
||||
loop:
|
||||
- src: tty.j2
|
||||
dest: "{{ _template.service.executable }}"
|
||||
mode: o+x
|
||||
- src: systemdunit.j2
|
||||
dest: /etc/systemd/system/{{ _template.service.name }}.service
|
||||
loop_control:
|
||||
label: "{{ item.src }}"
|
||||
|
@ -112,7 +112,10 @@
|
||||
|
||||
- name: Retrieve kubeconfig
|
||||
ansible.builtin.command:
|
||||
cmd: clusterctl get kubeconfig {{ vapp['workloadcluster.name'] | lower }}
|
||||
cmd: >-
|
||||
clusterctl get kubeconfig \
|
||||
{{ vapp['workloadcluster.name'] | lower }} \
|
||||
--kubeconfig {{ kubeconfig.path }}
|
||||
register: capi_kubectl_config
|
||||
|
||||
- name: Store kubeconfig in tempfile
|
||||
|
@ -17,11 +17,16 @@ COMPONENTS=('ca' 'storage' 'registry' 'git' 'gitops')
|
||||
FQDN='{{ vapp['metacluster.fqdn'] }}'
|
||||
IPADDRESS='{{ vapp['guestinfo.ipaddress'] }}'
|
||||
|
||||
# Waiting to allow boot sequence to finish; crude!
|
||||
sleep 30
|
||||
clear > /dev/tty1
|
||||
I=10
|
||||
|
||||
while /bin/true; do
|
||||
if [[ $I -lt 9 ]]; 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user