1 // Command line tool to manage remote hosts
3 // SPDX-License-Identifier: GPL-3.0-or-later
4 // Copyright (C) 2021-2024 Simon Ruderich
12 "ruderich.org/simon/safcm/cmd/safcm/config"
17 log.Fatalf("usage: %[1]s sync [<options>] <host|group...>\n"+
31 err = MainSync(os.Args)
33 if len(os.Args) != 2 {
38 if len(os.Args) != 2 {
50 func LoadBaseFiles() (*config.Config, *config.Hosts, map[string][]string,
53 cfg, err := config.LoadConfig()
55 return nil, nil, nil, err
57 hosts, err := config.LoadHosts()
59 return nil, nil, nil, err
61 groups, err := config.LoadGroups(cfg, hosts)
63 return nil, nil, nil, err
65 return cfg, hosts, groups, nil