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
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.
m. +49 172 840 88 28
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.