Ask Your Question
0

Learning Puppet - Exercise

asked 2013-08-16 03:08:56 -0600

JohnSmith gravatar image

updated 2013-08-16 09:08:43 -0600

llowder gravatar image

Hi guys,

I'm having difficulties with this exercise: "Try wrapping a user resource in a human::user type that automatically grabs that personʼs .bashrc file from your site module and manages one or more ssh_authorized_key resources for their account"

1. Is this the right structure?:

  • 1.1 human
  • 1.1.1 |-> manifests
  • 1.1.1.1 |-> init.pp
  • 1.1.1.2 |-> user.pp

2. What do I have to edit in the .bashrc-file?

3. What does "site module" in this context mean?

Can anyone please give me hints?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2013-08-25 05:43:57 -0600

golja gravatar image
  • The structure is right, however you need co create another folder named files/ where you will store the bashrc template file.

  • From what I can understand this exercises is expecting from you to create a module with a defined type human::user which copies the .bashrc file from your module to the user home. So something like that should do the trick.

    file {"$/home/${name}/.bashrc":
        source => "puppet:///modules/human/bashrc",
        owner => ${name},
        require => ADD_DEPENDENCY,
        ....
    }
    

and copy the bashrc file in the files folder in your module. Obviously you should adjust the above example to match your design.

  • Regarding the ...

(more)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-08-16 03:08:56 -0600

Seen: 653 times

Last updated: Aug 25 '13