Help with setting up a profile

18 views
Skip to first unread message

Alex Samad

unread,
Jun 29, 2016, 1:48:07 AM6/29/16
to Puppet Users
Hi

I have a new install.

I want to use the node <- role <<- profiles  setup.

I want to define a profile for sshd for my environment.

So I want to use a sshd module (I will check the forge) and have some things preset.
1) I would like to turn off password acces for root account
2) turn off x11 
3) turn on forwarding
4) also for root I would like to install a public for my master root


so I have my environment location

/etc/puppetlabs/code/environments/production


i have (from the control repo)
site/profile/manifests
and
site/role/manifests

do I create 
site/profile/manifests/mysshd.pp

class profile::mysshd {

        package { 'sshd' :
                ensure => 'present',
        }
        ### options set ???

}

and then potentially a role in 

site/role/manifests/mysshrole.pp
class role::mysshrole {
 include profile::mysshd
}

and then I go to 

manifests/site.pp

add in my node definition

node {
 include role:mysshd
}


Does that look about right ??



Haani Niyaz

unread,
Jul 7, 2016, 11:40:16 PM7/7/16
to Puppet Users
You should be including the role, not the profile in your manifests/site.pp

node {
 include role
::mysshrole
}
Reply all
Reply to author
Forward
0 new messages