Please Help Me - Foreman / Smart Class Parameter / Puppet / Modules Order

Hello all,

I really need your assistance as I'm lost.
My scenario is as follows:

  1. I wrote two Puppet modules: local_repositroy & spacewalk (attached)
  2. I use Foreman as ENC
  3. I override the class parameters of the 2 Puppet modules with the smart
    class parameter option of the Foreman
  4. The local_repository module configures a local repositroy which holds
    the RPMs for the spacewalk installation so it has to run before the
    spacewalk module
  5. I have other modules which install other RPMs so those modules have to
    run only after the spacewalk module so the order should be as follows:
    local_repositroy -> spacewalk -> module A
    local_repositroy -> spacewalk -> module B
    local_repositroy -> spacewalk -> module c

  6. How do I tie it all together? I have been told, that I might need to
    write some kind of a wrapper but I'm not sure / know how to do it.

I really got lost and I don't know how to continue.
Do I really need to use a wrapper? If the answer is yes, how will it work
with the smart class parameter option? Maybe someone can send me the
wrapper?
Do I have another option?

Any help is appreciated.

Thanks,

Royee Tager

modules.zip (7.24 KB)

Anyone? Please

Something like this:

class sitespacewalk (
$site_baseurl = "http://${::fqdn}/${::architecture},
$site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk"
$site_activation_key = "abcd123"
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

Then in foreman only apply the sitespacewalk class and specify your smart
variables there.

Matt

··· On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager wrote:

Anyone? Please


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Hi Matt,
Thanks fore answering.
you forgot:
" (line 2)
, (line 3)

So now the manifest is:
class wrapper (
$site_baseurl = "http://${::fqdn}/${::architecture}",
$site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk",
$site_activation_key = "abcd123"
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

When I run it, I get the following error message: "Error 400 on server:
undefined method 'downcase' for :undef :symbol at
/etc/puppet/environemnts/development/modules/wrapper/manifests/init.pp:8

What does it mean?

··· On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak wrote:

Something like this:

class sitespacewalk (
$site_baseurl = "http://${::fqdn}/${::architecture},
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

Then in foreman only apply the sitespacewalk class and specify your smart
variables there.

Matt

On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager royeectu@gmail.com wrote:

Anyone? Please


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

That's ok, you are trying to help me and I really appreciate it.
From the output it still seems that the spcewalk modules runs before the
local_repositroy module.
How come?
Ignore the error, I need to copy the packages…

Info: Applying configuration version '1414786914'
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-setup' returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure: change
from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list
rhn-setup' returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhnsd' returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change from
absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list
rhnsd' returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools'
returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure:
change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0
-y list rhn-client-tools' returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list m2crypto' returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: change
from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list
m2crypto' returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin'
returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure:
change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0
-y list yum-rhn-plugin' returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-check' returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure: change
from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list
rhn-check' returned 1: Error: No matching Packages to list
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[m2crypto] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhnsd] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-client-tools] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-setup] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[yum-rhn-plugin] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-check] has failures: true
Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: Skipping
because of failed dependencies
Notice: /Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure:
created
Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to 644
Notice: Finished catalog run in 1.19 seconds
[root@centos65 yum.repos.d]#

בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew Hyclak:

··· > > I also have an error on the class { lines - that's what I get for typing > it in email and not testing. > > class { '::local_repository': > ... > > class { '::spacewalk': > ... > > Matt > > On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager > wrote: > >> Hi Matt, >> Thanks fore answering. >> you forgot: >> " (line 2) >> , (line 3) >> >> So now the manifest is: >> class wrapper ( >> $site_baseurl = "http://${::fqdn}/${::architecture}", >> $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk", >> $site_activation_key = "abcd123" >> ) { >> class { $::local_repository: >> baseurl => $site_baseurl, >> } >> >> class { $::spacewalk: >> spacewalk_server_fqdn => $site_spacewalk_server_fqdn, >> activation_key => $site_activation_key, >> } >> >> Class[::local_repository] -> Class[::spacewalk] >> } >> >> When I run it, I get the following error message: "Error 400 on server: >> undefined method 'downcase' for :undef :symbol at >> /etc/puppet/environemnts/development/modules/wrapper/manifests/init.pp:8 >> >> What does it mean? >> >> On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak > > wrote: >> >>> Something like this: >>> >>> class sitespacewalk ( >>> $site_baseurl = "http://${::fqdn}/${::architecture}, >>> $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk" >>> $site_activation_key = "abcd123" >>> ) { >>> class { $::local_repository: >>> baseurl => $site_baseurl, >>> } >>> >>> class { $::spacewalk: >>> spacewalk_server_fqdn => $site_spacewalk_server_fqdn, >>> activation_key => $site_activation_key, >>> } >>> >>> Class[::local_repository] -> Class[::spacewalk] >>> } >>> >>> Then in foreman only apply the sitespacewalk class and specify your >>> smart variables there. >>> >>> Matt >>> >>> On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager >> > wrote: >>> >>>> Anyone? Please >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Foreman users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to foreman-user...@googlegroups.com . >>>> To post to this group, send email to forema...@googlegroups.com >>>> . >>>> Visit this group at http://groups.google.com/group/foreman-users. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Foreman users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to foreman-user...@googlegroups.com . >>> To post to this group, send email to forema...@googlegroups.com >>> . >>> Visit this group at http://groups.google.com/group/foreman-users. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >

Only wrapper is assigned to that host.
I added quotes to the classes:

class wrapper (
$site_baseurl = "test",
$site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk",
$site_activation_key = "abcd123"
) {
class { '::local_repository':
baseurl => $site_baseurl,
}

class { '::spacewalk':
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class['::local_repository'] -> Class['::spacewalk']
}

Unfortunately, it still doesn't work (wrong order).
What can I do?

בתאריך יום שישי, 31 באוקטובר 2014 22:58:10 UTC+2, מאת Matthew Hyclak:

··· > > Not sure I have an answer to why it's not going in the correct order. You > don't have the base classes assigned to the hosts as well, right? It may be > a subtle syntax thing, looking more closely the classes should be quoted: > > Class['::local_repository'] -> Class['::spacewalk'] > > > On Fri, Oct 31, 2014 at 4:22 PM, Royee Tager > wrote: > >> That's ok, you are trying to help me and I really appreciate it. >> From the output it still seems that the spcewalk modules runs before the >> local_repositroy module. >> How come? >> Ignore the error, I need to copy the packages.... >> >> Info: Applying configuration version '1414786914' >> Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-setup' returned >> 1: Error: No matching Packages to list >> Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure: change >> from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list >> rhn-setup' returned 1: Error: No matching Packages to list >> Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhnsd' returned 1: >> Error: No matching Packages to list >> Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change from >> absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list >> rhnsd' returned 1: Error: No matching Packages to list >> Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools' >> returned 1: Error: No matching Packages to list >> Error: /Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure: >> change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 >> -y list rhn-client-tools' returned 1: Error: No matching Packages to list >> Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list m2crypto' returned 1: >> Error: No matching Packages to list >> Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: change >> from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list >> m2crypto' returned 1: Error: No matching Packages to list >> Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin' >> returned 1: Error: No matching Packages to list >> Error: /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure: >> change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 >> -y list yum-rhn-plugin' returned 1: Error: No matching Packages to list >> Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-check' returned >> 1: Error: No matching Packages to list >> Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure: change >> from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list >> rhn-check' returned 1: Error: No matching Packages to list >> Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency >> Package[m2crypto] has failures: true >> Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency >> Package[rhnsd] has failures: true >> Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency >> Package[rhn-client-tools] has failures: true >> Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency >> Package[rhn-setup] has failures: true >> Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency >> Package[yum-rhn-plugin] has failures: true >> Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency >> Package[rhn-check] has failures: true >> Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: Skipping >> because of failed dependencies >> Notice: /Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure: >> created >> Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to 644 >> Notice: Finished catalog run in 1.19 seconds >> [root@centos65 yum.repos.d]# >> >> בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew Hyclak: >>> >>> I also have an error on the class { lines - that's what I get for typing >>> it in email and not testing. >>> >>> class { '::local_repository': >>> ... >>> >>> class { '::spacewalk': >>> ... >>> >>> Matt >>> >>> On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager wrote: >>> >>>> Hi Matt, >>>> Thanks fore answering. >>>> you forgot: >>>> " (line 2) >>>> , (line 3) >>>> >>>> So now the manifest is: >>>> class wrapper ( >>>> $site_baseurl = "http://${::fqdn}/${::architecture}", >>>> $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk", >>>> $site_activation_key = "abcd123" >>>> ) { >>>> class { $::local_repository: >>>> baseurl => $site_baseurl, >>>> } >>>> >>>> class { $::spacewalk: >>>> spacewalk_server_fqdn => $site_spacewalk_server_fqdn, >>>> activation_key => $site_activation_key, >>>> } >>>> >>>> Class[::local_repository] -> Class[::spacewalk] >>>> } >>>> >>>> When I run it, I get the following error message: "Error 400 on server: >>>> undefined method 'downcase' for :undef :symbol at /etc/puppet/environemnts/ >>>> development/modules/wrapper/manifests/init.pp:8 >>>> >>>> What does it mean? >>>> >>>> On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak >>>> wrote: >>>> >>>>> Something like this: >>>>> >>>>> class sitespacewalk ( >>>>> $site_baseurl = "http://${::fqdn}/${::architecture}, >>>>> $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk" >>>>> $site_activation_key = "abcd123" >>>>> ) { >>>>> class { $::local_repository: >>>>> baseurl => $site_baseurl, >>>>> } >>>>> >>>>> class { $::spacewalk: >>>>> spacewalk_server_fqdn => $site_spacewalk_server_fqdn, >>>>> activation_key => $site_activation_key, >>>>> } >>>>> >>>>> Class[::local_repository] -> Class[::spacewalk] >>>>> } >>>>> >>>>> Then in foreman only apply the sitespacewalk class and specify your >>>>> smart variables there. >>>>> >>>>> Matt >>>>> >>>>> On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager >>>>> wrote: >>>>> >>>>>> Anyone? Please >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Foreman users" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to foreman-user...@googlegroups.com. >>>>>> To post to this group, send email to forema...@googlegroups.com. >>>>>> Visit this group at http://groups.google.com/group/foreman-users. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Foreman users" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to foreman-user...@googlegroups.com. >>>>> To post to this group, send email to forema...@googlegroups.com. >>>>> Visit this group at http://groups.google.com/group/foreman-users. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout. >> > >

I also have an error on the class { lines - that's what I get for typing it
in email and not testing.

class { '::local_repository':

class { '::spacewalk':

Matt

··· On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager wrote:

Hi Matt,
Thanks fore answering.
you forgot:
" (line 2)
, (line 3)

So now the manifest is:
class wrapper (
$site_baseurl = “http://${::fqdn}/${::architecture}”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

When I run it, I get the following error message: "Error 400 on server:
undefined method ‘downcase’ for :undef :symbol at
/etc/puppet/environemnts/development/modules/wrapper/manifests/init.pp:8

What does it mean?

On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak hyclak@gmail.com wrote:

Something like this:

class sitespacewalk (
$site_baseurl = "http://${::fqdn}/${::architecture},
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

Then in foreman only apply the sitespacewalk class and specify your smart
variables there.

Matt

On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager royeectu@gmail.com wrote:

Anyone? Please


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Not sure I have an answer to why it's not going in the correct order. You
don't have the base classes assigned to the hosts as well, right? It may be
a subtle syntax thing, looking more closely the classes should be quoted:

Class['::local_repository'] -> Class['::spacewalk']

··· On Fri, Oct 31, 2014 at 4:22 PM, Royee Tager wrote:

That’s ok, you are trying to help me and I really appreciate it.
From the output it still seems that the spcewalk modules runs before the
local_repositroy module.
How come?
Ignore the error, I need to copy the packages…

Info: Applying configuration version '1414786914’
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-setup’ returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
rhn-setup’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhnsd’ returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change from
absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
rhnsd’ returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools’
returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure:
change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0
-y list rhn-client-tools’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list m2crypto’ returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
m2crypto’ returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin’
returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure:
change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0
-y list yum-rhn-plugin’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-check’ returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
rhn-check’ returned 1: Error: No matching Packages to list
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[m2crypto] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhnsd] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-client-tools] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-setup] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[yum-rhn-plugin] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-check] has failures: true
Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: Skipping
because of failed dependencies
Notice: /Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure:
created
Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to 644
Notice: Finished catalog run in 1.19 seconds
[root@centos65 yum.repos.d]#

בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew Hyclak:

I also have an error on the class { lines - that’s what I get for typing
it in email and not testing.

class { ‘::local_repository’:

class { ‘::spacewalk’:

Matt

On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager roye...@gmail.com wrote:

Hi Matt,
Thanks fore answering.
you forgot:
" (line 2)
, (line 3)

So now the manifest is:
class wrapper (
$site_baseurl = “http://${::fqdn}/${::architecture}”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

When I run it, I get the following error message: "Error 400 on server:
undefined method ‘downcase’ for :undef :symbol at /etc/puppet/environemnts/
development/modules/wrapper/manifests/init.pp:8

What does it mean?

On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak hyc...@gmail.com >>> wrote:

Something like this:

class sitespacewalk (
$site_baseurl = "http://${::fqdn}/${::architecture},
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

Then in foreman only apply the sitespacewalk class and specify your
smart variables there.

Matt

On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager roye...@gmail.com wrote:

Anyone? Please


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Only wrapper is assigned to that host.
I added quotes to the classes:

class wrapper (
$site_baseurl = "test",
$site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk",
$site_activation_key = "abcd123"
) {
class { '::local_repository':
baseurl => $site_baseurl,
}

class { '::spacewalk':
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class['::local_repository'] -> Class['::spacewalk']
}

Unfortunately, it still doesn't work (wrong order).
I attachted the output of the --graph option (png file) maybe it help us

··· On Fri Oct 31 2014 at 10:58:08 PM Matthew Hyclak wrote:

Not sure I have an answer to why it’s not going in the correct order. You
don’t have the base classes assigned to the hosts as well, right? It may be
a subtle syntax thing, looking more closely the classes should be quoted:

Class[’::local_repository’] -> Class[’::spacewalk’]

On Fri, Oct 31, 2014 at 4:22 PM, Royee Tager royeectu@gmail.com wrote:

That’s ok, you are trying to help me and I really appreciate it.
From the output it still seems that the spcewalk modules runs before the
local_repositroy module.
How come?
Ignore the error, I need to copy the packages…

Info: Applying configuration version '1414786914’
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-setup’ returned
1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
rhn-setup’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhnsd’ returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change from
absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
rhnsd’ returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools’
returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure:
change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0
-y list rhn-client-tools’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list m2crypto’ returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
m2crypto’ returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin’
returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure:
change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0
-y list yum-rhn-plugin’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-check’ returned
1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
rhn-check’ returned 1: Error: No matching Packages to list
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[m2crypto] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhnsd] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-client-tools] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-setup] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[yum-rhn-plugin] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-check] has failures: true
Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: Skipping
because of failed dependencies
Notice: /Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure:
created
Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to 644
Notice: Finished catalog run in 1.19 seconds
[root@centos65 yum.repos.d]#

בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew Hyclak:

I also have an error on the class { lines - that’s what I get for typing
it in email and not testing.

class { ‘::local_repository’:

class { ‘::spacewalk’:

Matt

On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager roye...@gmail.com wrote:

Hi Matt,
Thanks fore answering.
you forgot:
" (line 2)
, (line 3)

So now the manifest is:
class wrapper (
$site_baseurl = “http://${::fqdn}/${::architecture}”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

When I run it, I get the following error message: "Error 400 on server:
undefined method ‘downcase’ for :undef :symbol at /etc/puppet/environemnts/
development/modules/wrapper/manifests/init.pp:8

What does it mean?

On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak hyc...@gmail.com >>>> wrote:

Something like this:

class sitespacewalk (
$site_baseurl = "http://${::fqdn}/${::architecture},
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

Then in foreman only apply the sitespacewalk class and specify your
smart variables there.

Matt

On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager roye...@gmail.com >>>>> wrote:

Anyone? Please


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.

To unsubscribe from this group and stop receiving emails from it, send an

email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.

Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

You could try being more specific.

Class['::local_repository:: config'] -> Class['::spacewalk::install'] ->
Class['::spacewalk::config']

Play with that and see if you can make it so what you want.

··· On Oct 31, 2014 6:01 PM, "Royee Tager" wrote:

Only wrapper is assigned to that host.
I added quotes to the classes:

class wrapper (
$site_baseurl = “test”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { ‘::local_repository’:
baseurl => $site_baseurl,
}

class { ‘::spacewalk’:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[’::local_repository’] -> Class[’::spacewalk’]
}

Unfortunately, it still doesn’t work (wrong order).
I attachted the output of the --graph option (png file) maybe it help us

On Fri Oct 31 2014 at 10:58:08 PM Matthew Hyclak hyclak@gmail.com wrote:

Not sure I have an answer to why it’s not going in the correct order. You
don’t have the base classes assigned to the hosts as well, right? It may be
a subtle syntax thing, looking more closely the classes should be quoted:

Class[’::local_repository’] -> Class[’::spacewalk’]

On Fri, Oct 31, 2014 at 4:22 PM, Royee Tager royeectu@gmail.com wrote:

That’s ok, you are trying to help me and I really appreciate it.
From the output it still seems that the spcewalk modules runs before the
local_repositroy module.
How come?
Ignore the error, I need to copy the packages…

Info: Applying configuration version '1414786914’
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-setup’ returned
1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
rhn-setup’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhnsd’ returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
rhnsd’ returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools’
returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure:
change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0
-y list rhn-client-tools’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list m2crypto’ returned
1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
m2crypto’ returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin’
returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure:
change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0
-y list yum-rhn-plugin’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-check’ returned
1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
rhn-check’ returned 1: Error: No matching Packages to list
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[m2crypto] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhnsd] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-client-tools] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-setup] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[yum-rhn-plugin] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency
Package[rhn-check] has failures: true
Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: Skipping
because of failed dependencies
Notice:
/Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure: created
Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to 644
Notice: Finished catalog run in 1.19 seconds
[root@centos65 yum.repos.d]#

בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew Hyclak:

I also have an error on the class { lines - that’s what I get for
typing it in email and not testing.

class { ‘::local_repository’:

class { ‘::spacewalk’:

Matt

On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager roye...@gmail.com wrote:

Hi Matt,
Thanks fore answering.
you forgot:
" (line 2)
, (line 3)

So now the manifest is:
class wrapper (
$site_baseurl = “http://${::fqdn}/${::architecture}”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

When I run it, I get the following error message: "Error 400 on
server: undefined method ‘downcase’ for :undef :symbol at
/etc/puppet/environemnts/development/modules/wrapper/
manifests/init.pp:8

What does it mean?

On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak hyc...@gmail.com >>>>> wrote:

Something like this:

class sitespacewalk (
$site_baseurl = "http://${::fqdn}/${::architecture},
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

Then in foreman only apply the sitespacewalk class and specify your
smart variables there.

Matt

On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager roye...@gmail.com >>>>>> wrote:

Anyone? Please


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.

To unsubscribe from this group and stop receiving emails from it, send an

email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.

Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

It doesn't work.
I really don't know what to do.
It drives my crazy

··· On Sat Nov 01 2014 at 12:06:52 AM Matthew Hyclak wrote:

You could try being more specific.

Class[’::local_repository:: config’] -> Class[’::spacewalk::install’] ->
Class[’::spacewalk::config’]

Play with that and see if you can make it so what you want.
On Oct 31, 2014 6:01 PM, “Royee Tager” royeectu@gmail.com wrote:

Only wrapper is assigned to that host.
I added quotes to the classes:

class wrapper (
$site_baseurl = “test”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { ‘::local_repository’:
baseurl => $site_baseurl,
}

class { ‘::spacewalk’:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[’::local_repository’] -> Class[’::spacewalk’]
}

Unfortunately, it still doesn’t work (wrong order).
I attachted the output of the --graph option (png file) maybe it help us

On Fri Oct 31 2014 at 10:58:08 PM Matthew Hyclak hyclak@gmail.com >> wrote:

Not sure I have an answer to why it’s not going in the correct order.
You don’t have the base classes assigned to the hosts as well, right? It
may be a subtle syntax thing, looking more closely the classes should be
quoted:

Class[’::local_repository’] -> Class[’::spacewalk’]

On Fri, Oct 31, 2014 at 4:22 PM, Royee Tager royeectu@gmail.com wrote:

That’s ok, you are trying to help me and I really appreciate it.
From the output it still seems that the spcewalk modules runs before
the local_repositroy module.
How come?
Ignore the error, I need to copy the packages…

Info: Applying configuration version '1414786914’
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-setup’ returned
1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure:
change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0
-y list rhn-setup’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhnsd’ returned 1:
Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
rhnsd’ returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools’
returned 1: Error: No matching Packages to list
Error:
/Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
rhn-client-tools’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list m2crypto’ returned
1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: change
from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list
m2crypto’ returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin’
returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure:
change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0
-y list yum-rhn-plugin’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-check’ returned
1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure:
change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0
-y list rhn-check’ returned 1: Error: No matching Packages to list
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]:
Dependency Package[m2crypto] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]:
Dependency Package[rhnsd] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]:
Dependency Package[rhn-client-tools] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]:
Dependency Package[rhn-setup] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]:
Dependency Package[yum-rhn-plugin] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]:
Dependency Package[rhn-check] has failures: true
Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: Skipping
because of failed dependencies
Notice:
/Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure: created
Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to 644
Notice: Finished catalog run in 1.19 seconds
[root@centos65 yum.repos.d]#

בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew Hyclak:

I also have an error on the class { lines - that’s what I get for
typing it in email and not testing.

class { ‘::local_repository’:

class { ‘::spacewalk’:

Matt

On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager roye...@gmail.com >>>>> wrote:

Hi Matt,
Thanks fore answering.
you forgot:
" (line 2)
, (line 3)

So now the manifest is:
class wrapper (
$site_baseurl = “http://${::fqdn}/${::architecture}”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

When I run it, I get the following error message: "Error 400 on
server: undefined method ‘downcase’ for :undef :symbol at
/etc/puppet/environemnts/development/modules/wrapper/
manifests/init.pp:8

What does it mean?

On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak hyc...@gmail.com >>>>>> wrote:

Something like this:

class sitespacewalk (
$site_baseurl = "http://${::fqdn}/${::architecture},
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

Then in foreman only apply the sitespacewalk class and specify your
smart variables there.

Matt

On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager roye...@gmail.com >>>>>>> wrote:

Anyone? Please


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “Foreman users” group.

To unsubscribe from this group and stop receiving emails from it, send

an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.

Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Try making the dependency on the yum repo

Yumrepo['xio_custom'] -> Package <| |>

You might have to specify the packages a little stricter (like naming them explicitly), but depending on the rest of your manifests something like Yumrepo <| |> -> Package <| |> might actually work - it forces all repos to be installed before any package is installed, regardless of which module the definitions reside in. Keep in mind that there might be some packages that you need to be able to install yumrepos.

good luck
felix

··· -- Felix Gilcher Geschäftsführer

m. +49 172 840 88 28

asquera GmbH
Ohlauer Straße 43
D-10999 Berlin

AG Charlottenburg, HRB 140808 B
Geschäftsführung: Felix Gilcher, Florian Gilcher

On 31 Oct 2014, at 23:16, Royee Tager royeectu@gmail.com wrote:

It doesn’t work.
I really don’t know what to do.
It drives my crazy

On Sat Nov 01 2014 at 12:06:52 AM Matthew Hyclak hyclak@gmail.com wrote:
You could try being more specific.

Class[’::local_repository:: config’] -> Class[’::spacewalk::install’] -> Class[’::spacewalk::config’]

Play with that and see if you can make it so what you want.

On Oct 31, 2014 6:01 PM, “Royee Tager” royeectu@gmail.com wrote:
Only wrapper is assigned to that host.
I added quotes to the classes:

class wrapper (
$site_baseurl = “test”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { ‘::local_repository’:
baseurl => $site_baseurl,
}

class { ‘::spacewalk’:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[’::local_repository’] -> Class[’::spacewalk’]
}

Unfortunately, it still doesn’t work (wrong order).
I attachted the output of the --graph option (png file) maybe it help us<configuration.png>

On Fri Oct 31 2014 at 10:58:08 PM Matthew Hyclak hyclak@gmail.com wrote:
Not sure I have an answer to why it’s not going in the correct order. You don’t have the base classes assigned to the hosts as well, right? It may be a subtle syntax thing, looking more closely the classes should be quoted:

Class[’::local_repository’] -> Class[’::spacewalk’]

On Fri, Oct 31, 2014 at 4:22 PM, Royee Tager royeectu@gmail.com wrote:
That’s ok, you are trying to help me and I really appreciate it.
From the output it still seems that the spcewalk modules runs before the local_repositroy module.
How come?
Ignore the error, I need to copy the packages…

Info: Applying configuration version '1414786914’
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-setup’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-setup’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhnsd’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhnsd’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list m2crypto’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list m2crypto’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-check’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-check’ returned 1: Error: No matching Packages to list
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[m2crypto] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhnsd] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhn-client-tools] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhn-setup] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[yum-rhn-plugin] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhn-check] has failures: true
Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: Skipping because of failed dependencies
Notice: /Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure: created
Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to 644
Notice: Finished catalog run in 1.19 seconds
[root@centos65 yum.repos.d]#

בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew Hyclak:
I also have an error on the class { lines - that’s what I get for typing it in email and not testing.

class { ‘::local_repository’:

class { ‘::spacewalk’:

Matt

On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager roye...@gmail.com wrote:
Hi Matt,
Thanks fore answering.
you forgot:
" (line 2)
, (line 3)

So now the manifest is:
class wrapper (
$site_baseurl = “http://${::fqdn}/${::architecture}”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

When I run it, I get the following error message: "Error 400 on server: undefined method ‘downcase’ for :undef :symbol at /etc/puppet/environemnts/development/modules/wrapper/manifests/init.pp:8

What does it mean?

On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak hyc...@gmail.com wrote:
Something like this:

class sitespacewalk (
$site_baseurl = "http://${::fqdn}/${::architecture},
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

Then in foreman only apply the sitespacewalk class and specify your smart variables there.

Matt

On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager roye...@gmail.com wrote:
Anyone? Please


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.

Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Thanks Felix, your solution works and I'm going to use it, but still I
would like to understand why the
Class['::local_repository'] -> Class['::spacewalk']
doesn't work.
In addiiton I have other modules (such as Apache,NTP) that will have to run
only after the Spacewalk module
How can I do it?
For example:
local_repository -> spacewalk-> apache
local_repositroy -> spacewalk -> ntp

בתאריך יום שבת, 1 בנובמבר 2014 01:25:24 UTC+2, מאת Felix Gilcher:

··· > > Try making the dependency on the yum repo > > Yumrepo['xio_custom'] -> Package <| |> > > You might have to specify the packages a little stricter (like naming them > explicitly), but depending on the rest of your manifests something like > Yumrepo <| |> -> Package <| |> might actually work - it forces all repos to > be installed before any package is installed, regardless of which module > the definitions reside in. Keep in mind that there might be some packages > that you need to be able to install yumrepos. > > good luck > felix > -- > Felix Gilcher > Geschäftsführer > > m. +49 172 840 88 28 > > asquera GmbH > Ohlauer Straße 43 > D-10999 Berlin > > AG Charlottenburg, HRB 140808 B > Geschäftsführung: Felix Gilcher, Florian Gilcher > > On 31 Oct 2014, at 23:16, Royee Tager <roye...@gmail.com > > wrote: > > > It doesn't work. > > I really don't know what to do. > > It drives my crazy > > > > On Sat Nov 01 2014 at 12:06:52 AM Matthew Hyclak > wrote: > > You could try being more specific. > > > > Class['::local_repository:: config'] -> Class['::spacewalk::install'] -> > Class['::spacewalk::config'] > > > > Play with that and see if you can make it so what you want. > > > > On Oct 31, 2014 6:01 PM, "Royee Tager" <roye...@gmail.com > > wrote: > > Only wrapper is assigned to that host. > > I added quotes to the classes: > > > > class wrapper ( > > $site_baseurl = "test", > > $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk", > > $site_activation_key = "abcd123" > > ) { > > class { '::local_repository': > > baseurl => $site_baseurl, > > } > > > > class { '::spacewalk': > > spacewalk_server_fqdn => $site_spacewalk_server_fqdn, > > activation_key => $site_activation_key, > > } > > > > Class['::local_repository'] -> Class['::spacewalk'] > > } > > > > Unfortunately, it still doesn't work (wrong order). > > I attachted the output of the --graph option (png file) maybe it help > us > > > > On Fri Oct 31 2014 at 10:58:08 PM Matthew Hyclak > wrote: > > Not sure I have an answer to why it's not going in the correct order. > You don't have the base classes assigned to the hosts as well, right? It > may be a subtle syntax thing, looking more closely the classes should be > quoted: > > > > Class['::local_repository'] -> Class['::spacewalk'] > > > > > > On Fri, Oct 31, 2014 at 4:22 PM, Royee Tager > wrote: > > That's ok, you are trying to help me and I really appreciate it. > > From the output it still seems that the spcewalk modules runs before the > local_repositroy module. > > How come? > > Ignore the error, I need to copy the packages.... > > > > Info: Applying configuration version '1414786914' > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-setup' returned > 1: Error: No matching Packages to list > > Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure: change > from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list > rhn-setup' returned 1: Error: No matching Packages to list > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhnsd' returned 1: > Error: No matching Packages to list > > Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change > from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list > rhnsd' returned 1: Error: No matching Packages to list > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools' > returned 1: Error: No matching Packages to list > > Error: /Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure: > change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 > -y list rhn-client-tools' returned 1: Error: No matching Packages to list > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list m2crypto' returned > 1: Error: No matching Packages to list > > Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: change > from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list > m2crypto' returned 1: Error: No matching Packages to list > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin' > returned 1: Error: No matching Packages to list > > Error: /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure: > change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 > -y list yum-rhn-plugin' returned 1: Error: No matching Packages to list > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-check' returned > 1: Error: No matching Packages to list > > Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure: change > from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list > rhn-check' returned 1: Error: No matching Packages to list > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency > Package[m2crypto] has failures: true > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency > Package[rhnsd] has failures: true > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency > Package[rhn-client-tools] has failures: true > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency > Package[rhn-setup] has failures: true > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency > Package[yum-rhn-plugin] has failures: true > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency > Package[rhn-check] has failures: true > > Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: Skipping > because of failed dependencies > > Notice: > /Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure: created > > Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to 644 > > Notice: Finished catalog run in 1.19 seconds > > [root@centos65 yum.repos.d]# > > > > בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew Hyclak: > > I also have an error on the class { lines - that's what I get for typing > it in email and not testing. > > > > class { '::local_repository': > > ... > > > > class { '::spacewalk': > > ... > > > > Matt > > > > On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager wrote: > > Hi Matt, > > Thanks fore answering. > > you forgot: > > " (line 2) > > , (line 3) > > > > So now the manifest is: > > class wrapper ( > > $site_baseurl = "http://${::fqdn}/${::architecture}", > > $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk", > > $site_activation_key = "abcd123" > > ) { > > class { $::local_repository: > > baseurl => $site_baseurl, > > } > > > > class { $::spacewalk: > > spacewalk_server_fqdn => $site_spacewalk_server_fqdn, > > activation_key => $site_activation_key, > > } > > > > Class[::local_repository] -> Class[::spacewalk] > > } > > > > When I run it, I get the following error message: "Error 400 on server: > undefined method 'downcase' for :undef :symbol at > /etc/puppet/environemnts/development/modules/wrapper/manifests/init.pp:8 > > > > What does it mean? > > > > On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak > wrote: > > Something like this: > > > > class sitespacewalk ( > > $site_baseurl = "http://${::fqdn}/${::architecture}, > > $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk" > > $site_activation_key = "abcd123" > > ) { > > class { $::local_repository: > > baseurl => $site_baseurl, > > } > > > > class { $::spacewalk: > > spacewalk_server_fqdn => $site_spacewalk_server_fqdn, > > activation_key => $site_activation_key, > > } > > > > Class[::local_repository] -> Class[::spacewalk] > > } > > > > Then in foreman only apply the sitespacewalk class and specify your > smart variables there. > > > > Matt > > > > On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager wrote: > > Anyone? Please > > > > -- > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com. > > To post to this group, send email to forema...@googlegroups.com. > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com. > > To post to this group, send email to forema...@googlegroups.com. > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > > > > -- > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > >

The reason why Class['::local_repository'] -> Class['::spacewalk'] does not work is that the resources contained in the classes are not constrained by the ordering you give, at least not in the way your code is structured. There are ways to constrain the contained resources, that's a topic covered by the puppet documentation. There's a long discussion of the anchor pattern here: http://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern

The solution I gave you is more a sledgehammer approach: It enforces a specific ordering between packages and repositories which makes sense in our specific case: We want to install certain packages from our own repos, partially overwriting default repos in some cases, so we want repo-definitions to be handled before installing packages, always, independent of where the package or repo is defined.

Hope that helps
Felix

··· -- Felix Gilcher Geschäftsführer

m. +49 172 840 88 28

asquera GmbH
Ohlauer Straße 43
D-10999 Berlin

AG Charlottenburg, HRB 140808 B
Geschäftsführung: Felix Gilcher, Florian Gilcher

On 01 Nov 2014, at 14:43, Royee Tager royeectu@gmail.com wrote:

Thanks Felix, your solution works and I’m going to use it, but still I would like to understand why the
Class[’::local_repository’] -> Class[’::spacewalk’]
doesn’t work.
In addiiton I have other modules (such as Apache,NTP) that will have to run only after the Spacewalk module
How can I do it?
For example:
local_repository -> spacewalk-> apache
local_repositroy -> spacewalk -> ntp

בתאריך יום שבת, 1 בנובמבר 2014 01:25:24 UTC+2, מאת Felix Gilcher:
Try making the dependency on the yum repo

Yumrepo[‘xio_custom’] -> Package <| |>

You might have to specify the packages a little stricter (like naming them explicitly), but depending on the rest of your manifests something like Yumrepo <| |> -> Package <| |> might actually work - it forces all repos to be installed before any package is installed, regardless of which module the definitions reside in. Keep in mind that there might be some packages that you need to be able to install yumrepos.

good luck
felix

Felix Gilcher
Geschäftsführer

m. +49 172 840 88 28

asquera GmbH
Ohlauer Straße 43
D-10999 Berlin

AG Charlottenburg, HRB 140808 B
Geschäftsführung: Felix Gilcher, Florian Gilcher

On 31 Oct 2014, at 23:16, Royee Tager roye...@gmail.com wrote:

It doesn’t work.
I really don’t know what to do.
It drives my crazy

On Sat Nov 01 2014 at 12:06:52 AM Matthew Hyclak hyc...@gmail.com wrote:
You could try being more specific.

Class[’::local_repository:: config’] -> Class[’::spacewalk::install’] -> Class[’::spacewalk::config’]

Play with that and see if you can make it so what you want.

On Oct 31, 2014 6:01 PM, “Royee Tager” roye...@gmail.com wrote:
Only wrapper is assigned to that host.
I added quotes to the classes:

class wrapper (
$site_baseurl = “test”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { ‘::local_repository’:
baseurl => $site_baseurl,
}

class { ‘::spacewalk’:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[’::local_repository’] -> Class[’::spacewalk’]
}

Unfortunately, it still doesn’t work (wrong order).
I attachted the output of the --graph option (png file) maybe it help us<configuration.png>

On Fri Oct 31 2014 at 10:58:08 PM Matthew Hyclak hyc...@gmail.com wrote:
Not sure I have an answer to why it’s not going in the correct order. You don’t have the base classes assigned to the hosts as well, right? It may be a subtle syntax thing, looking more closely the classes should be quoted:

Class[’::local_repository’] -> Class[’::spacewalk’]

On Fri, Oct 31, 2014 at 4:22 PM, Royee Tager roye...@gmail.com wrote:
That’s ok, you are trying to help me and I really appreciate it.
From the output it still seems that the spcewalk modules runs before the local_repositroy module.
How come?
Ignore the error, I need to copy the packages…

Info: Applying configuration version '1414786914’
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-setup’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-setup’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhnsd’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhnsd’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list m2crypto’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list m2crypto’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-check’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-check’ returned 1: Error: No matching Packages to list
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[m2crypto] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhnsd] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhn-client-tools] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhn-setup] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[yum-rhn-plugin] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhn-check] has failures: true
Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: Skipping because of failed dependencies
Notice: /Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure: created
Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to 644
Notice: Finished catalog run in 1.19 seconds
[root@centos65 yum.repos.d]#

בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew Hyclak:
I also have an error on the class { lines - that’s what I get for typing it in email and not testing.

class { ‘::local_repository’:

class { ‘::spacewalk’:

Matt

On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager roye...@gmail.com wrote:
Hi Matt,
Thanks fore answering.
you forgot:
" (line 2)
, (line 3)

So now the manifest is:
class wrapper (
$site_baseurl = “http://${::fqdn}/${::architecture}”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

When I run it, I get the following error message: "Error 400 on server: undefined method ‘downcase’ for :undef :symbol at /etc/puppet/environemnts/development/modules/wrapper/manifests/init.pp:8

What does it mean?

On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak hyc...@gmail.com wrote:
Something like this:

class sitespacewalk (
$site_baseurl = "http://${::fqdn}/${::architecture},
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

Then in foreman only apply the sitespacewalk class and specify your smart variables there.

Matt

On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager roye...@gmail.com wrote:
Anyone? Please


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.

Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Thanks Felix, sure it helps.
I will read more about this topic.
What about the other modules which have to run only after the spacewalk
module?
How can I enforce my hosts to run the modules in the following order:
local_repoistory -> spacewalk -> moduleX?

בתאריך יום שבת, 1 בנובמבר 2014 15:54:21 UTC+2, מאת Felix Gilcher:

··· > > The reason why Class['::local_repository'] -> Class['::spacewalk'] does > not work is that the resources contained in the classes are not constrained > by the ordering you give, at least not in the way your code is structured. > There are ways to constrain the contained resources, that's a topic covered > by the puppet documentation. There's a long discussion of the anchor > pattern here: > http://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern > > The solution I gave you is more a sledgehammer approach: It enforces a > specific ordering between packages and repositories which makes sense in > our specific case: We want to install certain packages from our own repos, > partially overwriting default repos in some cases, so we want > repo-definitions to be handled before installing packages, always, > independent of where the package or repo is defined. > > Hope that helps > Felix > > -- > Felix Gilcher > Geschäftsführer > > m. +49 172 840 88 28 > > asquera GmbH > Ohlauer Straße 43 > D-10999 Berlin > > AG Charlottenburg, HRB 140808 B > Geschäftsführung: Felix Gilcher, Florian Gilcher > > On 01 Nov 2014, at 14:43, Royee Tager <roye...@gmail.com > > wrote: > > > Thanks Felix, your solution works and I'm going to use it, but still I > would like to understand why the > > Class['::local_repository'] -> Class['::spacewalk'] > > doesn't work. > > In addiiton I have other modules (such as Apache,NTP) that will have to > run only after the Spacewalk module > > How can I do it? > > For example: > > local_repository -> spacewalk-> apache > > local_repositroy -> spacewalk -> ntp > > > > בתאריך יום שבת, 1 בנובמבר 2014 01:25:24 UTC+2, מאת Felix Gilcher: > > Try making the dependency on the yum repo > > > > Yumrepo['xio_custom'] -> Package <| |> > > > > You might have to specify the packages a little stricter (like naming > them explicitly), but depending on the rest of your manifests something > like Yumrepo <| |> -> Package <| |> might actually work - it forces all > repos to be installed before any package is installed, regardless of which > module the definitions reside in. Keep in mind that there might be some > packages that you need to be able to install yumrepos. > > > > good luck > > felix > > -- > > Felix Gilcher > > Geschäftsführer > > > > m. +49 172 840 88 28 > > > > asquera GmbH > > Ohlauer Straße 43 > > D-10999 Berlin > > > > AG Charlottenburg, HRB 140808 B > > Geschäftsführung: Felix Gilcher, Florian Gilcher > > > > On 31 Oct 2014, at 23:16, Royee Tager wrote: > > > > > It doesn't work. > > > I really don't know what to do. > > > It drives my crazy > > > > > > On Sat Nov 01 2014 at 12:06:52 AM Matthew Hyclak > wrote: > > > You could try being more specific. > > > > > > Class['::local_repository:: config'] -> Class['::spacewalk::install'] > -> Class['::spacewalk::config'] > > > > > > Play with that and see if you can make it so what you want. > > > > > > On Oct 31, 2014 6:01 PM, "Royee Tager" wrote: > > > Only wrapper is assigned to that host. > > > I added quotes to the classes: > > > > > > class wrapper ( > > > $site_baseurl = "test", > > > $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk", > > > $site_activation_key = "abcd123" > > > ) { > > > class { '::local_repository': > > > baseurl => $site_baseurl, > > > } > > > > > > class { '::spacewalk': > > > spacewalk_server_fqdn => $site_spacewalk_server_fqdn, > > > activation_key => $site_activation_key, > > > } > > > > > > Class['::local_repository'] -> Class['::spacewalk'] > > > } > > > > > > Unfortunately, it still doesn't work (wrong order). > > > I attachted the output of the --graph option (png file) maybe it help > us > > > > > > On Fri Oct 31 2014 at 10:58:08 PM Matthew Hyclak > wrote: > > > Not sure I have an answer to why it's not going in the correct order. > You don't have the base classes assigned to the hosts as well, right? It > may be a subtle syntax thing, looking more closely the classes should be > quoted: > > > > > > Class['::local_repository'] -> Class['::spacewalk'] > > > > > > > > > On Fri, Oct 31, 2014 at 4:22 PM, Royee Tager > wrote: > > > That's ok, you are trying to help me and I really appreciate it. > > > From the output it still seems that the spcewalk modules runs before > the local_repositroy module. > > > How come? > > > Ignore the error, I need to copy the packages.... > > > > > > Info: Applying configuration version '1414786914' > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-setup' > returned 1: Error: No matching Packages to list > > > Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure: > change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 > -y list rhn-setup' returned 1: Error: No matching Packages to list > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhnsd' returned 1: > Error: No matching Packages to list > > > Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change > from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list > rhnsd' returned 1: Error: No matching Packages to list > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools' > returned 1: Error: No matching Packages to list > > > Error: > /Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure: change > from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list > rhn-client-tools' returned 1: Error: No matching Packages to list > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list m2crypto' returned > 1: Error: No matching Packages to list > > > Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: > change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 > -y list m2crypto' returned 1: Error: No matching Packages to list > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin' > returned 1: Error: No matching Packages to list > > > Error: /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure: > change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 > -y list yum-rhn-plugin' returned 1: Error: No matching Packages to list > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-check' > returned 1: Error: No matching Packages to list > > > Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure: > change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 > -y list rhn-check' returned 1: Error: No matching Packages to list > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[m2crypto] has failures: true > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[rhnsd] has failures: true > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[rhn-client-tools] has failures: true > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[rhn-setup] has failures: true > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[yum-rhn-plugin] has failures: true > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[rhn-check] has failures: true > > > Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Skipping because of failed dependencies > > > Notice: > /Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure: created > > > Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to > 644 > > > Notice: Finished catalog run in 1.19 seconds > > > [root@centos65 yum.repos.d]# > > > > > > בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew Hyclak: > > > I also have an error on the class { lines - that's what I get for > typing it in email and not testing. > > > > > > class { '::local_repository': > > > ... > > > > > > class { '::spacewalk': > > > ... > > > > > > Matt > > > > > > On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager > wrote: > > > Hi Matt, > > > Thanks fore answering. > > > you forgot: > > > " (line 2) > > > , (line 3) > > > > > > So now the manifest is: > > > class wrapper ( > > > $site_baseurl = "http://${::fqdn}/${::architecture}", > > > $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk", > > > $site_activation_key = "abcd123" > > > ) { > > > class { $::local_repository: > > > baseurl => $site_baseurl, > > > } > > > > > > class { $::spacewalk: > > > spacewalk_server_fqdn => $site_spacewalk_server_fqdn, > > > activation_key => $site_activation_key, > > > } > > > > > > Class[::local_repository] -> Class[::spacewalk] > > > } > > > > > > When I run it, I get the following error message: "Error 400 on > server: undefined method 'downcase' for :undef :symbol at > /etc/puppet/environemnts/development/modules/wrapper/manifests/init.pp:8 > > > > > > What does it mean? > > > > > > On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak > wrote: > > > Something like this: > > > > > > class sitespacewalk ( > > > $site_baseurl = "http://${::fqdn}/${::architecture}, > > > $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk" > > > $site_activation_key = "abcd123" > > > ) { > > > class { $::local_repository: > > > baseurl => $site_baseurl, > > > } > > > > > > class { $::spacewalk: > > > spacewalk_server_fqdn => $site_spacewalk_server_fqdn, > > > activation_key => $site_activation_key, > > > } > > > > > > Class[::local_repository] -> Class[::spacewalk] > > > } > > > > > > Then in foreman only apply the sitespacewalk class and specify your > smart variables there. > > > > > > Matt > > > > > > On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager > wrote: > > > Anyone? Please > > > > > > -- > > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com. > > > To post to this group, send email to forema...@googlegroups.com. > > > Visit this group at http://groups.google.com/group/foreman-users. > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > -- > > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com. > > > To post to this group, send email to forema...@googlegroups.com. > > > Visit this group at http://groups.google.com/group/foreman-users. > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > -- > > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com. > > > To post to this group, send email to forema...@googlegroups.com. > > > > > > Visit this group at http://groups.google.com/group/foreman-users. > > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com. > > > To post to this group, send email to forema...@googlegroups.com. > > > Visit this group at http://groups.google.com/group/foreman-users. > > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > >

Hi,

the doc link I sent you describes exactly what you need. However, in general it's recommended to build your modules as independent from ordering as possible.

Best
Felix

··· -- Felix Gilcher Geschäftsführer

m. +49 172 840 88 28

asquera GmbH
Ohlauer Straße 43
D-10999 Berlin

AG Charlottenburg, HRB 140808 B
Geschäftsführung: Felix Gilcher, Florian Gilcher

On 01 Nov 2014, at 15:06, Royee Tager royeectu@gmail.com wrote:

Thanks Felix, sure it helps.
I will read more about this topic.
What about the other modules which have to run only after the spacewalk module?
How can I enforce my hosts to run the modules in the following order: local_repoistory -> spacewalk -> moduleX?

בתאריך יום שבת, 1 בנובמבר 2014 15:54:21 UTC+2, מאת Felix Gilcher:
The reason why Class[’::local_repository’] -> Class[’::spacewalk’] does not work is that the resources contained in the classes are not constrained by the ordering you give, at least not in the way your code is structured. There are ways to constrain the contained resources, that’s a topic covered by the puppet documentation. There’s a long discussion of the anchor pattern here:http://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern

The solution I gave you is more a sledgehammer approach: It enforces a specific ordering between packages and repositories which makes sense in our specific case: We want to install certain packages from our own repos, partially overwriting default repos in some cases, so we want repo-definitions to be handled before installing packages, always, independent of where the package or repo is defined.

Hope that helps
Felix


Felix Gilcher
Geschäftsführer

m. +49 172 840 88 28

asquera GmbH
Ohlauer Straße 43
D-10999 Berlin

AG Charlottenburg, HRB 140808 B
Geschäftsführung: Felix Gilcher, Florian Gilcher

On 01 Nov 2014, at 14:43, Royee Tager roye...@gmail.com wrote:

Thanks Felix, your solution works and I’m going to use it, but still I would like to understand why the
Class[’::local_repository’] -> Class[’::spacewalk’]
doesn’t work.
In addiiton I have other modules (such as Apache,NTP) that will have to run only after the Spacewalk module
How can I do it?
For example:
local_repository -> spacewalk-> apache
local_repositroy -> spacewalk -> ntp

בתאריך יום שבת, 1 בנובמבר 2014 01:25:24 UTC+2, מאת Felix Gilcher:
Try making the dependency on the yum repo

Yumrepo[‘xio_custom’] -> Package <| |>

You might have to specify the packages a little stricter (like naming them explicitly), but depending on the rest of your manifests something like Yumrepo <| |> -> Package <| |> might actually work - it forces all repos to be installed before any package is installed, regardless of which module the definitions reside in. Keep in mind that there might be some packages that you need to be able to install yumrepos.

good luck
felix

Felix Gilcher
Geschäftsführer

m. +49 172 840 88 28

asquera GmbH
Ohlauer Straße 43
D-10999 Berlin

AG Charlottenburg, HRB 140808 B
Geschäftsführung: Felix Gilcher, Florian Gilcher

On 31 Oct 2014, at 23:16, Royee Tager roye...@gmail.com wrote:

It doesn’t work.
I really don’t know what to do.
It drives my crazy

On Sat Nov 01 2014 at 12:06:52 AM Matthew Hyclak hyc...@gmail.com wrote:
You could try being more specific.

Class[’::local_repository:: config’] -> Class[’::spacewalk::install’] -> Class[’::spacewalk::config’]

Play with that and see if you can make it so what you want.

On Oct 31, 2014 6:01 PM, “Royee Tager” roye...@gmail.com wrote:
Only wrapper is assigned to that host.
I added quotes to the classes:

class wrapper (
$site_baseurl = “test”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { ‘::local_repository’:
baseurl => $site_baseurl,
}

class { ‘::spacewalk’:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[’::local_repository’] -> Class[’::spacewalk’]
}

Unfortunately, it still doesn’t work (wrong order).
I attachted the output of the --graph option (png file) maybe it help us<configuration.png>

On Fri Oct 31 2014 at 10:58:08 PM Matthew Hyclak hyc...@gmail.com wrote:
Not sure I have an answer to why it’s not going in the correct order. You don’t have the base classes assigned to the hosts as well, right? It may be a subtle syntax thing, looking more closely the classes should be quoted:

Class[’::local_repository’] -> Class[’::spacewalk’]

On Fri, Oct 31, 2014 at 4:22 PM, Royee Tager roye...@gmail.com wrote:
That’s ok, you are trying to help me and I really appreciate it.
From the output it still seems that the spcewalk modules runs before the local_repositroy module.
How come?
Ignore the error, I need to copy the packages…

Info: Applying configuration version '1414786914’
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-setup’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-setup’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhnsd’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhnsd’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-client-tools’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list m2crypto’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list m2crypto’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin’ returned 1: Error: No matching Packages to list
Error: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-check’ returned 1: Error: No matching Packages to list
Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure: change from absent to present failed: Execution of ‘/usr/bin/yum -d 0 -e 0 -y list rhn-check’ returned 1: Error: No matching Packages to list
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[m2crypto] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhnsd] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhn-client-tools] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhn-setup] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[yum-rhn-plugin] has failures: true
Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: Dependency Package[rhn-check] has failures: true
Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: Skipping because of failed dependencies
Notice: /Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure: created
Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to 644
Notice: Finished catalog run in 1.19 seconds
[root@centos65 yum.repos.d]#

בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew Hyclak:
I also have an error on the class { lines - that’s what I get for typing it in email and not testing.

class { ‘::local_repository’:

class { ‘::spacewalk’:

Matt

On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager roye...@gmail.com wrote:
Hi Matt,
Thanks fore answering.
you forgot:
" (line 2)
, (line 3)

So now the manifest is:
class wrapper (
$site_baseurl = “http://${::fqdn}/${::architecture}”,
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”,
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

When I run it, I get the following error message: "Error 400 on server: undefined method ‘downcase’ for :undef :symbol at /etc/puppet/environemnts/development/modules/wrapper/manifests/init.pp:8

What does it mean?

On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak hyc...@gmail.com wrote:
Something like this:

class sitespacewalk (
$site_baseurl = "http://${::fqdn}/${::architecture},
$site_spacewalk_server_fqdn = “http://${::fqdn}/spacewalk”
$site_activation_key = “abcd123”
) {
class { $::local_repository:
baseurl => $site_baseurl,
}

class { $::spacewalk:
spacewalk_server_fqdn => $site_spacewalk_server_fqdn,
activation_key => $site_activation_key,
}

Class[::local_repository] -> Class[::spacewalk]
}

Then in foreman only apply the sitespacewalk class and specify your smart variables there.

Matt

On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager roye...@gmail.com wrote:
Anyone? Please


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.

Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Felix & Matt,
I would like to thank you for helping me.
I really appreciate it.

Thanks,

Royee Tager

בתאריך יום שבת, 1 בנובמבר 2014 16:08:44 UTC+2, מאת Felix Gilcher:

··· > > Hi, > > the doc link I sent you describes exactly what you need. However, in > general it's recommended to build your modules as independent from ordering > as possible. > > Best > Felix > -- > Felix Gilcher > Geschäftsführer > > m. +49 172 840 88 28 > > asquera GmbH > Ohlauer Straße 43 > D-10999 Berlin > > AG Charlottenburg, HRB 140808 B > Geschäftsführung: Felix Gilcher, Florian Gilcher > > On 01 Nov 2014, at 15:06, Royee Tager <roye...@gmail.com > > wrote: > > > Thanks Felix, sure it helps. > > I will read more about this topic. > > What about the other modules which have to run only after the spacewalk > module? > > How can I enforce my hosts to run the modules in the following order: > local_repoistory -> spacewalk -> moduleX? > > > > בתאריך יום שבת, 1 בנובמבר 2014 15:54:21 UTC+2, מאת Felix Gilcher: > > The reason why Class['::local_repository'] -> Class['::spacewalk'] does > not work is that the resources contained in the classes are not constrained > by the ordering you give, at least not in the way your code is structured. > There are ways to constrain the contained resources, that's a topic covered > by the puppet documentation. There's a long discussion of the anchor > pattern here: > http://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern > > > > The solution I gave you is more a sledgehammer approach: It enforces a > specific ordering between packages and repositories which makes sense in > our specific case: We want to install certain packages from our own repos, > partially overwriting default repos in some cases, so we want > repo-definitions to be handled before installing packages, always, > independent of where the package or repo is defined. > > > > Hope that helps > > Felix > > > > -- > > Felix Gilcher > > Geschäftsführer > > > > m. +49 172 840 88 28 > > > > asquera GmbH > > Ohlauer Straße 43 > > D-10999 Berlin > > > > AG Charlottenburg, HRB 140808 B > > Geschäftsführung: Felix Gilcher, Florian Gilcher > > > > On 01 Nov 2014, at 14:43, Royee Tager wrote: > > > > > Thanks Felix, your solution works and I'm going to use it, but still I > would like to understand why the > > > Class['::local_repository'] -> Class['::spacewalk'] > > > doesn't work. > > > In addiiton I have other modules (such as Apache,NTP) that will have > to run only after the Spacewalk module > > > How can I do it? > > > For example: > > > local_repository -> spacewalk-> apache > > > local_repositroy -> spacewalk -> ntp > > > > > > בתאריך יום שבת, 1 בנובמבר 2014 01:25:24 UTC+2, מאת Felix Gilcher: > > > Try making the dependency on the yum repo > > > > > > Yumrepo['xio_custom'] -> Package <| |> > > > > > > You might have to specify the packages a little stricter (like naming > them explicitly), but depending on the rest of your manifests something > like Yumrepo <| |> -> Package <| |> might actually work - it forces all > repos to be installed before any package is installed, regardless of which > module the definitions reside in. Keep in mind that there might be some > packages that you need to be able to install yumrepos. > > > > > > good luck > > > felix > > > -- > > > Felix Gilcher > > > Geschäftsführer > > > > > > m. +49 172 840 88 28 > > > > > > asquera GmbH > > > Ohlauer Straße 43 > > > D-10999 Berlin > > > > > > AG Charlottenburg, HRB 140808 B > > > Geschäftsführung: Felix Gilcher, Florian Gilcher > > > > > > On 31 Oct 2014, at 23:16, Royee Tager wrote: > > > > > > > It doesn't work. > > > > I really don't know what to do. > > > > It drives my crazy > > > > > > > > On Sat Nov 01 2014 at 12:06:52 AM Matthew Hyclak > wrote: > > > > You could try being more specific. > > > > > > > > Class['::local_repository:: config'] -> > Class['::spacewalk::install'] -> Class['::spacewalk::config'] > > > > > > > > Play with that and see if you can make it so what you want. > > > > > > > > On Oct 31, 2014 6:01 PM, "Royee Tager" wrote: > > > > Only wrapper is assigned to that host. > > > > I added quotes to the classes: > > > > > > > > class wrapper ( > > > > $site_baseurl = "test", > > > > $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk", > > > > $site_activation_key = "abcd123" > > > > ) { > > > > class { '::local_repository': > > > > baseurl => $site_baseurl, > > > > } > > > > > > > > class { '::spacewalk': > > > > spacewalk_server_fqdn => $site_spacewalk_server_fqdn, > > > > activation_key => $site_activation_key, > > > > } > > > > > > > > Class['::local_repository'] -> Class['::spacewalk'] > > > > } > > > > > > > > Unfortunately, it still doesn't work (wrong order). > > > > I attachted the output of the --graph option (png file) maybe it > help us > > > > > > > > On Fri Oct 31 2014 at 10:58:08 PM Matthew Hyclak > wrote: > > > > Not sure I have an answer to why it's not going in the correct > order. You don't have the base classes assigned to the hosts as well, > right? It may be a subtle syntax thing, looking more closely the classes > should be quoted: > > > > > > > > Class['::local_repository'] -> Class['::spacewalk'] > > > > > > > > > > > > On Fri, Oct 31, 2014 at 4:22 PM, Royee Tager > wrote: > > > > That's ok, you are trying to help me and I really appreciate it. > > > > From the output it still seems that the spcewalk modules runs before > the local_repositroy module. > > > > How come? > > > > Ignore the error, I need to copy the packages.... > > > > > > > > Info: Applying configuration version '1414786914' > > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-setup' > returned 1: Error: No matching Packages to list > > > > Error: /Stage[main]/Spacewalk::Install/Package[rhn-setup]/ensure: > change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 > -y list rhn-setup' returned 1: Error: No matching Packages to list > > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhnsd' returned > 1: Error: No matching Packages to list > > > > Error: /Stage[main]/Spacewalk::Install/Package[rhnsd]/ensure: change > from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list > rhnsd' returned 1: Error: No matching Packages to list > > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list > rhn-client-tools' returned 1: Error: No matching Packages to list > > > > Error: > /Stage[main]/Spacewalk::Install/Package[rhn-client-tools]/ensure: change > from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list > rhn-client-tools' returned 1: Error: No matching Packages to list > > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list m2crypto' > returned 1: Error: No matching Packages to list > > > > Error: /Stage[main]/Spacewalk::Install/Package[m2crypto]/ensure: > change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 > -y list m2crypto' returned 1: Error: No matching Packages to list > > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list yum-rhn-plugin' > returned 1: Error: No matching Packages to list > > > > Error: > /Stage[main]/Spacewalk::Install/Package[yum-rhn-plugin]/ensure: change from > absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list > yum-rhn-plugin' returned 1: Error: No matching Packages to list > > > > Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list rhn-check' > returned 1: Error: No matching Packages to list > > > > Error: /Stage[main]/Spacewalk::Install/Package[rhn-check]/ensure: > change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 > -y list rhn-check' returned 1: Error: No matching Packages to list > > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[m2crypto] has failures: true > > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[rhnsd] has failures: true > > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[rhn-client-tools] has failures: true > > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[rhn-setup] has failures: true > > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[yum-rhn-plugin] has failures: true > > > > Notice: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Dependency Package[rhn-check] has failures: true > > > > Warning: /Stage[main]/Spacewalk::Config/Exec[register-client]: > Skipping because of failed dependencies > > > > Notice: > /Stage[main]/Local_repository::Config/Yumrepo[xio_custom]/ensure: created > > > > Info: changing mode of /etc/yum.repos.d/xio_custom.repo from 600 to > 644 > > > > Notice: Finished catalog run in 1.19 seconds > > > > [root@centos65 yum.repos.d]# > > > > > > > > בתאריך יום שישי, 31 באוקטובר 2014 22:10:07 UTC+2, מאת Matthew > Hyclak: > > > > I also have an error on the class { lines - that's what I get for > typing it in email and not testing. > > > > > > > > class { '::local_repository': > > > > ... > > > > > > > > class { '::spacewalk': > > > > ... > > > > > > > > Matt > > > > > > > > On Fri, Oct 31, 2014 at 4:07 PM, Royee Tager > wrote: > > > > Hi Matt, > > > > Thanks fore answering. > > > > you forgot: > > > > " (line 2) > > > > , (line 3) > > > > > > > > So now the manifest is: > > > > class wrapper ( > > > > $site_baseurl = "http://${::fqdn}/${::architecture}", > > > > $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk", > > > > $site_activation_key = "abcd123" > > > > ) { > > > > class { $::local_repository: > > > > baseurl => $site_baseurl, > > > > } > > > > > > > > class { $::spacewalk: > > > > spacewalk_server_fqdn => $site_spacewalk_server_fqdn, > > > > activation_key => $site_activation_key, > > > > } > > > > > > > > Class[::local_repository] -> Class[::spacewalk] > > > > } > > > > > > > > When I run it, I get the following error message: "Error 400 on > server: undefined method 'downcase' for :undef :symbol at > /etc/puppet/environemnts/development/modules/wrapper/manifests/init.pp:8 > > > > > > > > What does it mean? > > > > > > > > On Fri Oct 31 2014 at 8:16:25 PM Matthew Hyclak > wrote: > > > > Something like this: > > > > > > > > class sitespacewalk ( > > > > $site_baseurl = "http://${::fqdn}/${::architecture}, > > > > $site_spacewalk_server_fqdn = "http://${::fqdn}/spacewalk" > > > > $site_activation_key = "abcd123" > > > > ) { > > > > class { $::local_repository: > > > > baseurl => $site_baseurl, > > > > } > > > > > > > > class { $::spacewalk: > > > > spacewalk_server_fqdn => $site_spacewalk_server_fqdn, > > > > activation_key => $site_activation_key, > > > > } > > > > > > > > Class[::local_repository] -> Class[::spacewalk] > > > > } > > > > > > > > Then in foreman only apply the sitespacewalk class and specify your > smart variables there. > > > > > > > > Matt > > > > > > > > On Fri, Oct 31, 2014 at 9:45 AM, Royee Tager > wrote: > > > > Anyone? Please > > > > > > > > -- > > > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > > > To unsubscribe from this group and stop receiving emails from it, > send an email to foreman-user...@googlegroups.com. > > > > To post to this group, send email to forema...@googlegroups.com. > > > > Visit this group at http://groups.google.com/group/foreman-users. > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > > > -- > > > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > > > To unsubscribe from this group and stop receiving emails from it, > send an email to foreman-user...@googlegroups.com. > > > > To post to this group, send email to forema...@googlegroups.com. > > > > Visit this group at http://groups.google.com/group/foreman-users. > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > > > -- > > > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > > > To unsubscribe from this group and stop receiving emails from it, > send an email to foreman-user...@googlegroups.com. > > > > To post to this group, send email to forema...@googlegroups.com. > > > > > > > > Visit this group at http://groups.google.com/group/foreman-users. > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > -- > > > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > > > To unsubscribe from this group and stop receiving emails from it, > send an email to foreman-user...@googlegroups.com. > > > > To post to this group, send email to forema...@googlegroups.com. > > > > Visit this group at http://groups.google.com/group/foreman-users. > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > -- > > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com. > > > To post to this group, send email to forema...@googlegroups.com. > > > Visit this group at http://groups.google.com/group/foreman-users. > > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to foreman-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > >