#!/bin/bash 

. /usr/lib/supportconfig/resources/supportconfig.rc

OF=cloud-init.txt
RPM=cloud-init

if rpm_verify $OF $RPM; then
        log_cmd $OF "systemctl status cloud-init-local.service"
        log_cmd $OF "systemctl status cloud-init.service"
        log_cmd $OF "systemctl status cloud-init.target"
        conf_files $OF /etc/cloud/cloud.cfg
        test -e cloud-init.tar.gz && mv cloud-init.tar.gz cloud-init.tar.gz.supportconfig-save
        cloud-init collect-logs
        mv cloud-init.tar.gz $LOG/
        test -e cloud-init.tar.gz.supportconfig-save && mv cloud-init.tar.gz.supportconfig-save cloud-init.tar.gz
else
        log_entry $OF note "cloud-init not installed"
fi
exit 0

