Hi everyone, I've 2 simple base classes:
class profile::base { anchor { 'base_repos_start': } class { '::yum::repo::epel': require => Anchor['base_repos_start']} class { '::yum::repo::puppet': require => Anchor['base_repos_start']} anchor { 'base_repos_end': } } class profile::openstack::base { anchor { 'rdo_repo_start': } class { '::yum::repo::rdo': require => Anchor['rdo_repo_start']} anchor { 'rdo_repo_end': } } And then I use this classes in another class which is related to a particular class of servers. class role::openstack::controller { class { '::profile::base': } -> class { '::profile::openstack::base': } -> class { '::profile::openstack::keystone': } -> class { '::profile::openstack::glance': } -> class { '::profile::openstack::nova::controller': } -> class { '::profile::openstack::neutron::controller': } } When I run puppet, I observe that "stuff" in class ::profile::openstack::glance starts happening before the repos get added via base classes profile::base & profile::openstack::base. The reason I say that resources from ::profile::openstack::glance start getting applied before base classes is (The output is from the first puppet run and the package installation of openstack-glance is present in class ::profile::openstack::glance): Debug: /Stage[main]/Neutron::Keystone::Auth/Keystone::Resource::Service_identity[neutron]/Keystone_endpoint[RegionOne/neutron]: Autorequiring Keystone_service[neutron] Info: Applying configuration version '1418737032' Debug: Prefetching yum resources for package Debug: Executing '/usr/bin/rpm --version' Debug: Executing '/usr/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'' Debug: Executing '/usr/bin/rpm -q openstack-glance --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n' Debug: Executing '/usr/bin/yum -d 0 -e 0 -y list openstack-glance' Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list openstack-glance' returned 1: Error: No matching Packages to list Error: /Stage[main]/Glance/Package[openstack-glance]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list openstack-glance' returned 1: Error: No matching Packages to list Notice: /Stage[main]/Glance::Notify::Rabbitmq/Glance_api_config[DEFAULT/kombu_ssl_keyfile]: Dependency Package[openstack-glance] has failures: true I think I'm using anchor patterns correctly but they don't seem to be working. Is there anything that I'm doing fundamentally wrong? Any possible reasons this might not be working? -- Cheers, Abhijeet Rastogi (shadyabhi) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACXxYfwAnaLqH_Q3OUZZ0cQNJcFBOZc1hnztzya7yQxi2msLXg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.