class nodo::resources { # Website resources if defined("websites::resources") { class { "websites::resources": } } # Packages $packages = lookup('packages', { merge => hash, default_value => [] }) create_resources('package', $packages) # Files $files = lookup('files', { merge => hash, default_value => {} }) create_resources('file', $files) # File lines $file_lines = lookup('file_lines', { merge => hash, default_value => {} }) create_resources('file_line', $file_lines) # Virtual machines $vms = lookup('virtual::machines', { merge => hash, default_value => {} }) create_resources('nodo::subsystem::virtual::instance', $vms) # Users $users = lookup('users', { merge => hash, default_value => {} }) create_resources('user::manage', $users) # Backup users $backup_users = lookup('backup_users', { merge => hash, default_value => {} }) create_resources('backup::user', $backup_users) # Cron entries $cron = lookup('cron::jobs', { merge => hash, default_value => {} }) create_resources('cron', $cron) # Hosts $hosts = lookup('hosts', { merge => hash, default_value => {} }) create_resources('host', $hosts) # Nginx entries $nginx = lookup('nginx::sites', { merge => hash, default_value => {} }) create_resources('nginx::site', $nginx) # SSH keys $sshkeys = lookup('sshkeys', { merge => hash, default_value => {} }) create_resources('sshkey', $sshkeys) # SSH Authorized keys $ssh_authorized_keys = lookup('ssh_authorized_keys', { merge => hash, default_value => {} }) create_resources('ssh_authorized_key', $ssh_authorized_keys) # PaX flags $pax = lookup('nodo::subsystem::grsec::paxctl', { merge => hash, default_value => {} }) create_resources('nodo::subsystem::grsec::paxctl', $pax) # Exec $execs = lookup('execs', { merge => hash, default_value => {} }) create_resources('exec', $execs) # Repositories $vcsrepos = lookup('vcsrepos', { merge => hash, default_value => {} }) create_resources('vcsrepo', $vcsrepos) }