Skip to content

Instantly share code, notes, and snippets.

@davehewy
Created May 30, 2018 10:53
Show Gist options
  • Save davehewy/1fc7d77533eebf8d8d9c3a76d58df93d to your computer and use it in GitHub Desktop.
Save davehewy/1fc7d77533eebf8d8d9c3a76d58df93d to your computer and use it in GitHub Desktop.
# Until further upgrades V3 pearson will not use host name classification and instead will apply common modules and stringently implement passed roles.
node default {
# apply our pmc_common module
class{'profile::common': }
# switch on $::pmc_role custom FACT
# do not fail if no role is specifically applied.
# given that we have only a few roles, a declarative switch statement like this is preferred.
case $::pmc_role {
'bastion': {
class{ 'role::bastion': }
class{ 'profile::persistent_ebs': }
}
default: {
notice("no role module found.")
}
}
# apply pmc_security module
class{'profile::security': }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment