I've solved the lsb-release problem in this way: $temp_version=$operatingsystemrelease $major_version=regsubst($temp_version,'^(\d+).*$','\1')
case $operatingsystem { debian: { case $major_version { 6: { $distro_codename="squeeze" include apt_official::debian_generic_sources include apt_official::apt_keys include apt_official::apt_requirements } 5: { $distro_codename="lenny" include apt_official::debian_generic_sources include apt_official::apt_keys include apt_official::apt_requirements } } } class apt_official::apt_requirements { case $operatingsystem { default: { package { "lsb-release": ensure => installed, require=>Class["apt_official::debian_generic_sources"]; } } } } On the other hand I have problems managing the user root password, if I run this manifest it works fine: class root_user_private_servers { user { "test": ensure=>"present", uid=>"1010", gid=>"50", comment=>"test", shell=>"/bin/bash", home=>"/home/test", managehome=>"false", allowdupe=>"false", password=> 'hashXXXXX', require => Class["apt_official::apt_requirements"]; } } But if I change the username to root, for example: class root_user_private_servers { user { "root": ensure=>"present", uid=>"0", gid=>"0", comment=>"root", shell=>"/bin/bash", home=>"/root", managehome=>"false", allowdupe=>"false", password=> 'hash', require => Class["apt_official::apt_requirements"]; } } I get the next error, err: Could not apply complete catalog: Found dependency cycles in the following relationships: User[root] => File[/etc/apt/sources.list.d], File[/etc/apt/sources.list.d] => File[/etc/apt/sources.list.d/00- official.sources.list], User[root] => File[/etc/apt/sources.list.d/00- official.sources.list], File[/etc/apt/sources.list.d] => Package[lsb- release], File[/etc/apt/sources.list.d/00-official.sources.list] => Package[lsb-release], File[/etc/apt/sources.list.d/01- security.sources.list] => Package[lsb-release], Exec[aptitude update] => Package[lsb-release], Exec[aptitude clean] => Package[lsb-release], Package[lsb-release] => User[root], File[/etc/apt/sources.list.d] => File[/etc/apt/sources.list.d/01-security.sources.list], User[root] => File[/etc/apt/sources.list.d/01-security.sources.list], File[/etc/apt/ sources.list.d/00-official.sources.list] => Exec[aptitude update], File[/etc/apt/sources.list.d/01-security.sources.list] => Exec[aptitude update], File[/etc/apt/sources.list.d/00- official.sources.list] => Exec[aptitude clean], File[/etc/apt/ sources.list.d/01-security.sources.list] => Exec[aptitude clean] I've used the next configuration: In templates.pp class testA { include apt_official include root_user_private_servers } In nodes.pp node 'debian-lenny.es.clara.net' { include testA } Please let my know if you need more info, it seems that there're some dependency problem managing the root user. Thanks in advance. On 18 abr, 09:36, Alexander Bien <ab...@nbmc.de> wrote: > >> The problem it's that when I run the class with stages it fails with a > >> dependency cicle. > > I have a similar problem as the OP of this thread. When i deploy run > stages to have the class "yum" in the pre stage, it works fine untill i > "realize" the root user: > > realize( > User["root"], > Ssh_authorized_key["root"], > ) > > Enabling the above line causes the dep cycles as seen in attached > puppet_depcycle.txt > > When i remove the realize statement, everything works fine. > > Also, when i remove run stages it works fine too. > > What could cause this, and how would i go about to debug this further? > > Regards > Alex > > puppet_depcycle.txt > 61 KVerDescargar > > puppet_no_depcycle.txt > 11 KVerDescargar -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.