Skip to content
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

Require Package['corosync'] breaks puppetrun if $package_corosync/pacemaker is set to false #398

Closed
wants to merge 2 commits into from

Conversation

kskurtveit
Copy link

Require Package['corosync']/Package['pacemaker'] breaks puppetrun if $package_corosync/pacemaker is set to false. Not able to use other repo or packages or just to use puppet to create a basic config when $package_corosync/pacemaker is set to false.

@roidelapluie
Copy link
Member

Please re-add the dependencies in the form:

if $package_macemaker {
Package['corosync'] -> File [ '/etc/corosync/corosync.conf' ]
}

@kskurtveit
Copy link
Author

Show me a slightly bigger example of what you mean and I'll add it for you.

@kskurtveit kskurtveit closed this Mar 13, 2017
@kskurtveit kskurtveit reopened this Mar 13, 2017
@oranenj
Copy link
Contributor

oranenj commented May 4, 2017

@kskurtveit: Nothing much bigger to show. For each dependency you remove as a metaparameter, you will need to introduce an explicit dependency using references, guarded by an if like @roidelapluie showed.

So if you have

file { 'bar':
  require => Package['corosync']
}

You'll need to change that to

file {'bar':
}
if $package_corosync {
  Package['corosync'] -> File['bar']
}

@ffrank
Copy link
Contributor

ffrank commented May 11, 2017

An alternative syntax is

file {'bar':
}
if $package_corosync {
  File['bar'] {
    require => Package['corosync']
  }
}

But the arrow syntax is preferable.

@wyardley
Copy link
Contributor

Would this commit (in the current modulesync branch) resolve the issue? 0d7cfb1
Is anyone interested / willing to fix remaining test failures?

@wyardley
Copy link
Contributor

I think this is fixed in #395, now merged. However, we'll still need to work on #408 and #409 before doing a release.

@wyardley wyardley closed this Oct 23, 2017
@wyardley wyardley added the bug Something isn't working label Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants