Ask Your Question

Why doesn't inheritance modify a file?

asked 2013-09-24 14:20:04 -0600

spuder gravatar image

If you go through the puppetlabs training on inheritance, you are given zsh and instructed to create zhs::developer

Spoiler Alert

This is what you are given


class zsh {
     package { 'zsh':
        ensure => present,
        before => File[ '/etc/zshrc'],
     file { '/etc/zshrc':
        ensure => file,
        owner  => 'root',
        group  => 'root',
        source => 'puppet:///modules/zsh/zshrc',

This is what you are expected to create


class zsh::developer inherits zsh {
    File ['/etc/zshrc'] {
          source => 'puppet:///modules/zsh/',

include zsh

#/etc ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-09-24 16:37:40 -0600

GregLarkin gravatar image

This works fine on my system, but I did notice that you have some spelling mistakes in the filenames above. Could it be that you didn't see an error emitted by Puppet when it could not change the contents of /etc/zshrc? Please check for error messages, and you should find the solution quickly.

edit flag offensive delete link more


Ah yes, you are correct. I had a misspelling in Ran the test again, and /etc/zshrc is now 80 characters.

spuder gravatar imagespuder ( 2013-09-24 16:48:35 -0600 )edit

Great - cheers!

GregLarkin gravatar imageGregLarkin ( 2013-09-24 16:59:03 -0600 )edit

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


Asked: 2013-09-24 14:20:04 -0600

Seen: 147 times

Last updated: Sep 24 '13