Mercurial > repos > other > Puppet
diff manifests/templates.pp @ 382:308b4149bee5
Add anchors to simplify dependencies
Previously, every file was linked to every service, which gets
combinatorially huge. So we link via an anchor instead.
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 21 Nov 2021 17:09:18 +0000 |
parents | 63adae1a374a |
children | f9a6f6ff8256 |
line wrap: on
line diff
--- a/manifests/templates.pp Fri Nov 19 19:57:35 2021 +0000 +++ b/manifests/templates.pp Sun Nov 21 17:09:18 2021 +0000 @@ -1,9 +1,15 @@ # Make sure packages come after their repos -File<| tag == 'repo-config' |> -> YumRepo<| |> -> Package<| |> +File<| tag == 'repo-config' |> +-> anchor { 'Repo-config': } +-> YumRepo<| |> +-> anchor { 'Repos': } +-> Package<| |> # Make sure all files are in place before starting services # FIXME: Title matches are to fix a dependency cycle -File<| tag != 'post-service' and title != '/etc/sysconfig/ip6tables' and title != '/etc/sysconfig/iptables' |> -> Service<| |> +File<| tag != 'post-service' and title != '/etc/sysconfig/ip6tables' and title != '/etc/sysconfig/iptables' |> +-> anchor { 'Pre-Service Files': } +-> Service<| |> # Set some shortcut variables #$os = $operatingsystem