diff --git a/manifests/init.pp b/manifests/init.pp index 91e32d0..ff6636e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -63,6 +63,7 @@ class zuul ( $worker_username = '', $sites = [], $nodes = [], + $connections = [], ) { include ::httpd include ::pip diff --git a/templates/zuul.conf.erb b/templates/zuul.conf.erb index 741d85b..df32db3 100644 --- a/templates/zuul.conf.erb +++ b/templates/zuul.conf.erb @@ -6,6 +6,7 @@ check_job_registration=<%= @gearman_check_job_registration %> start=<%= @internal_gearman %> log_config=/etc/zuul/gearman-logging.conf +<% if @gerrit_server != "" -%> [gerrit] server=<%= @gerrit_server %> user=<%= @gerrit_user %> @@ -13,6 +14,7 @@ sshkey=/var/lib/zuul/ssh/id_rsa <% if @gerrit_baseurl != "" -%> baseurl=<%= @gerrit_baseurl %> <% end -%> +<% end -%> [zuul] layout_config=/etc/zuul/layout/<%= @layout_file_name %> @@ -75,6 +77,14 @@ accept_nodes=<%= @accept_nodes %> <% end -%> <% end -%> +<% @connections.each do |connection| -%> +[connection "<%= connection['name'] %>"] +<% connection.each do |key,value| -%> +<%= key %>=<%= value %> +<% end -%> + +<% end -%> + <% @sites.each do |site| -%> [site "<%= site['name'] %>"] host=<%= site['host'] %>