body file control
{
  inputs => { "$(sys.libdir)/stdlib.cf" };
}

### Users main BEGIN ###
bundle agent main
{
  vars:
      "users" slist => { "jack", "john" };
      "skel" string => "/etc/skel";

  users:
    !windows::
      "$(users)"
        policy => "present",
        home_dir => "/home/$(users)",
        home_bundle => home_skel($(users), $(skel));
}
### Users main END ###

### Home Bundle BEGIN ###
bundle agent home_skel(user, skel)
# @brief Initialize a user's home directory with the contents of skel
# @param user The user's home directory to create
# @param skel The directory to seed the user's home with
{
  files:
    "/home/$(user)/."
      create => "true",
      copy_from => seed_cp($(skel)),
      depth_search => recurse("inf");
}
### Home Bundle END ###

### Locked User BEGIN ###
bundle agent service_accounts
{
  vars:
      "users" slist => { "apache", "libuuid" };

  users:
    !windows::
      "$(users)"
        policy => "locked";
}
### Locked User END ###
