- "host1.example.org: <nil> 3 host groups: all group group3 host1.example.org remove",
- "host1.example.org: <nil> 3 host group priorities (desc. order): host1.example.org",
- },
- nil,
- },
-
- {
- "project: host1 (log level info)",
- "project",
- "host1.example.org",
- nil,
- safcm.LogInfo,
- safcm.MsgSyncReq{
- Groups: []string{
- "all",
- "group",
- "group3",
- "remove",
- "host1.example.org",
- },
- Files: map[string]*safcm.File{
- "/": &safcm.File{Path: "/",
- OrigGroup: "group",
- Mode: fs.ModeDir | 0755 | fs.ModeSetgid,
- Uid: -1,
- Gid: -1,
- TriggerCommands: []string{
- "touch /.update",
- },
- },
- "/etc": &safcm.File{
- OrigGroup: "group",
- Path: "/etc",
- Mode: fs.ModeDir | 0755,
- Uid: -1,
- Gid: -1,
- },
- "/etc/.hidden": &safcm.File{
- OrigGroup: "group",
- Path: "/etc/.hidden",
- Mode: 0100 | fs.ModeSetuid | fs.ModeSetgid | fs.ModeSticky,
- Uid: -1,
- Gid: -1,
- Data: []byte("..."),
- },
- "/etc/motd": &safcm.File{
- OrigGroup: "group",
- Path: "/etc/motd",
- Mode: 0644,
- Uid: -1,
- Gid: -1,
- Data: []byte("Welcome to Host ONE\n\n\n\n\n\nall\n\n\nhost1.example.org\n\n\n\n"),
- },
- "/etc/rc.local": &safcm.File{
- OrigGroup: "group",
- Path: "/etc/rc.local",
- Mode: 0700,
- Uid: -1,
- Gid: -1,
- Data: []byte("#!/bin/sh\n"),
- TriggerCommands: []string{
- "/etc/rc.local",
- },
- },
- "/etc/resolv.conf": &safcm.File{
- OrigGroup: "group",
- Path: "/etc/resolv.conf",
- Mode: 0641,
- User: "user",
- Uid: -1,
- Group: "group",
- Gid: -1,
- Data: []byte("nameserver ::1\n"),
- TriggerCommands: []string{
- "echo resolv.conf updated",
- },
- },
- "/etc/test": &safcm.File{
- OrigGroup: "group",
- Path: "/etc/test",
- Mode: os.ModeSymlink | 0777,
- Uid: -1,
- Gid: -1,
- Data: []byte("doesnt-exist"),
- },
- },
- Packages: []string{
- "unbound",
- "unbound-anchor",
- },
- Services: []string{
- "unbound",
- },
- Commands: []*safcm.Command{
- {
- Cmd: "echo command one",
- },
- {
- Cmd: "echo -n command two",
- },
- },