#include "run.h" #include "log.h" #include #include #include sk_run_error sk_run_init_manifest( const char *target_host, bool dry_run, struct sk_config *config) { /* check if the initial manifest file exists */ const char *init_manifest = config->global.init_manifest; if (access(init_manifest, F_OK)) { sk_error("cannot find initial manifest (%s): %s", init_manifest, strerror(errno)); return SK_RUN_ERROR_GENERIC; } sk_error("%s: running manifest not yet implemented.", target_host); return SK_RUN_ERROR_GENERIC; } sk_run_error sk_run_start( const char *target_host, bool dry_run, struct sk_config *config) { sk_run_error rv = SK_RUN_OK; if (NULL == target_host) { sk_error("Target host missing"); return (rv = SK_RUN_ERROR_GENERIC); } sk_info("%s: Starting configuration run", target_host); /* TODO: set up local cache paths */ rv = sk_run_init_manifest(target_host, dry_run, config); /* TODO: cleanup */ if (SK_RUN_OK != rv) { sk_error("failed to configure the following host: %s", target_host); } return rv; }