Skip to content

Make file_line default to ensure => present #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 11, 2012

Conversation

jeffmccune
Copy link
Contributor

The examples in the file_line resource documentation state the following
resource should work:

file_line { 'sudo_rule':
  path => '/etc/sudoers',
  line => '%sudo ALL=(ALL) ALL',
}

Without this patch the example does not work because ensure is not set
to present.

This patch fixes the problem by setting the default value of ensure to
present.

Jeff McCune added 3 commits May 10, 2012 22:04
This patch back ports the file from the master branch.  The spec tests
fail without this patch applied.  This should make it easier to setup
Puppet settings using the puppet_spec_helper project.
This just changes the instance variables to a memoized let block and
gets ride of the before :each block.

The patch has no change in behavior.
The examples in the file_line resource documentation state the following
resource should work:

    file_line { 'sudo_rule':
      path => '/etc/sudoers',
      line => '%sudo ALL=(ALL) ALL',
    }

Without this patch the example does not work because ensure is not set
to present.

This patch fixes the problem by setting the default value of ensure to
present.
@jeffmccune jeffmccune merged commit 1373e70 into puppetlabs:2.3.x May 11, 2012
@duritong
Copy link
Contributor

@jeffmccune somebody complained on IRC that it doesn't work currently. And as I compare your fix and mine, it differes by yours not having defaultvalues in the ensurable block. I remember that this was actually a problem and it is required. So I think this isn't yet properly fixed.

I told the person on IRC to open a ticket.

@jeffmccune
Copy link
Contributor Author

Thanks I'll have a look this morning and get it fixed up.

I really appreciate you following up here and engaging the IRC channel.

-Jeff

On Tuesday, May 22, 2012, duritong wrote:

@jeffmccune somebody complained on IRC that it doesn't work currently. And
as I compare your fix and mine, it differes by yours not having
defaultvalues in the ensurable block. I remember that this was actually a
problem and it is required. So I think this isn't yet properly fixed.

I told the person on IRC to open a ticket.


Reply to this email directly or view it on GitHub:

#69 (comment)

@duritong
Copy link
Contributor

You'll find a fix in GH-65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants