X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=inline;f=modules%2Froles%2Fmanifests%2Fstatic_source.pp;h=960366cf9602f0eb085adcfa59e84909fc9ec7ac;hb=168aa3f05f914802698b8db5fdde823c4e992913;hp=bf012a6ea9264aa90205e6d848622ee96921dfab;hpb=927f9ca9bed8928ea91ba1a599857c483ae4994e;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/static_source.pp b/modules/roles/manifests/static_source.pp index bf012a6ea..960366cf9 100644 --- a/modules/roles/manifests/static_source.pp +++ b/modules/roles/manifests/static_source.pp @@ -1,14 +1,19 @@ +# a static source +# +# origin of static content. From here it goes to the static master before that one pushes it to the mirrors class roles::static_source { - include roles::static_base - file { '/etc/ssh/userkeys/staticsync': - content => template('roles/static-mirroring/static-mirror-authorized_keys.erb'), - } - file { '/usr/local/bin/static-mirror-ssh-wrap': - source => "puppet:///modules/roles/static-mirroring/static-mirror-ssh-wrap", - mode => '0555', - } - file { '/usr/local/bin/static-mirror-ssh-wrap': - source => 'puppet:///modules/roles/static-mirroring/static-mirror-ssh-wrap', - mode => '0555', - } + include roles::static::base + + if ! defined(Class["roles::static_master"]) { + # sources talk only to masters, but only set this up if we are not + # *also* a static master since we cannot have two meaningful roles::static:ssh + # instances in the current setup. + # + # this adds the limitation that the master of any component whose source is also a + # master node needs to have that same host as its master and not some other one. + class { 'roles::static::ssh': + add_tag => 'staticsync-master', + collect_tag => 'staticsync-source', + } + } }