Ejemplo n.º 1
0
func Main() {
	flags.Parse(rancherConfig.FilterGlobalConfig(os.Args[1:]))

	if save {
		err := saveCloudConfig()
		if err != nil {
			log.Fatalf("Failed to save cloud config: %v", err)
		}
	}

	if execute {
		err := executeCloudConfig()
		if err != nil {
			log.Fatalf("Failed to save cloud config: %v", err)
		}
	}
}
Ejemplo n.º 2
0
func Main() {
	flags.Parse(rancherConfig.FilterGlobalConfig(os.Args[1:]))

	log.Infof("Running cloud-init: save=%v, execute=%v", save, execute)

	if save {
		err := saveCloudConfig()
		if err != nil {
			log.Fatalf("Failed to save cloud config: %v", err)
		}
	}

	if execute {
		err := executeCloudConfig()
		if err != nil {
			log.Fatalf("Failed to save cloud config: %v", err)
		}
	}
}
Ejemplo n.º 3
0
func Main() {
	flags.Parse(rancherConfig.FilterGlobalConfig(os.Args[1:]))

	log.Infof("Running cloud-init: save=%v, execute=%v", save, execute)

	if save {
		err := saveCloudConfig()
		if err != nil {
			log.WithFields(log.Fields{"err": err}).Error("Failed to save cloud-config")
		}
	}

	if execute {
		err := executeCloudConfig()
		if err != nil {
			log.WithFields(log.Fields{"err": err}).Error("Failed to execute cloud-config")
		}
	}
}