I'm writing a module, that will provide for mirrored yum-repositories on our network. The single server will host the mirrors offering them to other hosts (and itself).
I have a problem with the initial chicken-and-egg -- the first download may not happen for a while, but, if I enable a new repository before the mirroring script for it finishes the first run, I can not install any package due to yum-failures. But at some point later it needs to be enabled...
Can I have the enabled
-attribute of my yumrepo
-resource depend on whether or not "${repodir}/repodata/repomd.xml"
exists at the time of the Puppet-run?
I thought of inline_template
, but it runs on Puppet-server, not client. Can anything else be done while staying within Puppet itself (without custom functions)?
Perhaps, the attribute can be triggered by whether or not an Exec
took place -- I could then make Exec
conditional on a file's presence with creates
-attribute?
We are still at Puppet-3.7.5 here... Thanks!