Giuseppe Lavagetto has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/371022 )
Change subject: confd: fix templates for the future parser. ...................................................................... confd: fix templates for the future parser. Change-Id: I8ee24e8079a221953f33b5ea0f1bbd84d3642781 --- M modules/confd/templates/initscripts/confd.systemd.erb M modules/confd/templates/initscripts/confd.upstart.erb 2 files changed, 23 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/371022/1 diff --git a/modules/confd/templates/initscripts/confd.systemd.erb b/modules/confd/templates/initscripts/confd.systemd.erb index 0ecb310..912a66e 100644 --- a/modules/confd/templates/initscripts/confd.systemd.erb +++ b/modules/confd/templates/initscripts/confd.systemd.erb @@ -1,23 +1,27 @@ <%- -if @interval - opts = "-interval=#{@interval}" +if scope['confd::interval'] + opts = "-interval=#{scope['confd::interval']}" else opts = "-watch" end if @prefix and !@prefix.empty? - opts += " -prefix=#{@prefix}" + opts += " -prefix=#{scope['confd::prefix']}" end +backend = scope['confd::backend'] +node = scope['confd::node'] +srv_dns = scope['confd::srv_dns'] +scheme = scope['confd::scheme'] -%> [Unit] Description=confd [Service] User=root -Environment="CONFD_BACKEND=<%= @backend %>" -<%- if @node -%> -Environment="CONFD_DISCOVERY=-node <%= @node %>" +Environment="CONFD_BACKEND=<%= backend %>" +<%- if node -%> +Environment="CONFD_DISCOVERY=-node <%= node %>" <%- else -%> -Environment="CONFD_DISCOVERY=-srv-domain <%= @srv_dns %> -scheme <%= @scheme %>" +Environment="CONFD_DISCOVERY=-srv-domain <%= srv_dns %> -scheme <%= scheme %>" <%- end -%> Environment="CONFD_OPTS=<%= opts %>" ExecStart=/usr/bin/confd -backend $CONFD_BACKEND $CONFD_DISCOVERY $CONFD_OPTS diff --git a/modules/confd/templates/initscripts/confd.upstart.erb b/modules/confd/templates/initscripts/confd.upstart.erb index 867ba8c..e29fbaf 100644 --- a/modules/confd/templates/initscripts/confd.upstart.erb +++ b/modules/confd/templates/initscripts/confd.upstart.erb @@ -1,16 +1,23 @@ +<%- +backend = scope['confd::backend'] +node = scope['confd::node'] +srv_dns = scope['confd::srv_dns'] +scheme = scope['confd::scheme'] +interval = scope['confd::interval'] +-%> # confd config management daemon description "Confd config management daemon" start on (local-filesystem and net-device-up IFACE!=lo) script - CONFD_BACKEND="<%= @backend %>" - <%- if @node -%> - CONFD_DISCOVERY="-node <%= @node %>" + CONFD_BACKEND="<%= backend %>" + <%- if node -%> + CONFD_DISCOVERY="-node <%= node %>" <%- else -%> - CONFD_DISCOVERY="-srv-domain <%= @srv_dns %> -scheme <%= @scheme %>" + CONFD_DISCOVERY="-srv-domain <%= srv_dns %> -scheme <%= scheme %>" <%- end -%> - CONFD_OPTS="<% if @interval %>-interval <%= @interval %><% else %>-watch<% end %>" + CONFD_OPTS="<% if interval %>-interval <%= interval %><% else %>-watch<% end %>" /usr/bin/confd -backend $CONFD_BACKEND $CONFD_DISCOVERY $CONFD_OPTS end script -- To view, visit https://gerrit.wikimedia.org/r/371022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ee24e8079a221953f33b5ea0f1bbd84d3642781 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits