From c9dd65779fa361eb458562474b66558e721a0281 Mon Sep 17 00:00:00 2001 From: Spencer Krum Date: Tue, 3 Nov 2015 23:05:12 -0800 Subject: [PATCH] Add puppet apply settings to puppet.conf We need to exist for a period of time with both agent and apply being operational so that we can test things appropriately. This moves agent specific settings to the [agent] section and adds a [user] section which is used to control puppet apply. As part of this, we need to add a production environment to all of our nodes. Doing this in this way will also cover the current puppetmaster, since puppetmaster is a puppet client. Change-Id: I550c474d1c51c5795f745630fb91ee8cc1a55e36 --- .../production_environment.conf | 0 .../manifests/puppetmaster.pp | 20 ------------------- .../openstack_project/manifests/template.pp | 20 +++++++++++++++++++ .../templates/puppet.conf.erb | 14 +++++++------ 4 files changed, 28 insertions(+), 26 deletions(-) rename modules/openstack_project/files/{puppetmaster => puppet}/production_environment.conf (100%) diff --git a/modules/openstack_project/files/puppetmaster/production_environment.conf b/modules/openstack_project/files/puppet/production_environment.conf similarity index 100% rename from modules/openstack_project/files/puppetmaster/production_environment.conf rename to modules/openstack_project/files/puppet/production_environment.conf diff --git a/modules/openstack_project/manifests/puppetmaster.pp b/modules/openstack_project/manifests/puppetmaster.pp index c6c7735ad1..fe2a09643d 100644 --- a/modules/openstack_project/manifests/puppetmaster.pp +++ b/modules/openstack_project/manifests/puppetmaster.pp @@ -10,26 +10,6 @@ class openstack_project::puppetmaster ( include logrotate include openstack_project::params - file {'/etc/puppet/environments': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - } - file {'/etc/puppet/environments/production': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - } - file {'/etc/puppet/environments/production/environment.conf': - ensure => file, - owner => 'root', - group => 'root', - mode => '0644', - source => 'puppet:///modules/openstack_project/puppetmaster/production_environment.conf', - } - include ansible file { '/etc/ansible/hostfile': diff --git a/modules/openstack_project/manifests/template.pp b/modules/openstack_project/manifests/template.pp index b23c92dac1..e4d1134355 100644 --- a/modules/openstack_project/manifests/template.pp +++ b/modules/openstack_project/manifests/template.pp @@ -414,6 +414,26 @@ class openstack_project::template ( source => 'puppet:///modules/openstack_project/puppet/hiera.yaml', replace => true, } + + file {'/etc/puppet/environments': + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + } + file {'/etc/puppet/environments/production': + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755', + } + file {'/etc/puppet/environments/production/environment.conf': + ensure => file, + owner => 'root', + group => 'root', + mode => '0644', + source => 'puppet:///modules/openstack_project/puppet/production_environment.conf', + } ########################################################### } diff --git a/modules/openstack_project/templates/puppet.conf.erb b/modules/openstack_project/templates/puppet.conf.erb index 01954bb60b..4c52a8d2ad 100644 --- a/modules/openstack_project/templates/puppet.conf.erb +++ b/modules/openstack_project/templates/puppet.conf.erb @@ -3,20 +3,16 @@ logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet -server=<%= @puppetmaster_server %> -certname=<%= @certname.downcase %> -pluginsync=true +basemodulepath=/etc/puppet/modules +environmentpath = /etc/puppet/environments data_binding_terminus = none - [master] # These are needed when the puppetmaster is run by passenger # and can safely be removed if webrick is used. ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY reports=store,puppetdb -basemodulepath = /etc/puppet/modules -environmentpath = /etc/puppet/environments environmenttimeout = 0 <% if @ca_server -%> ca = false @@ -27,3 +23,9 @@ ca_server = <%= @ca_server %> report=true splay=true runinterval=600 +server=<%= @puppetmaster_server %> +certname=<%= @certname.downcase %> +pluginsync=true + +[user] +reports=puppetdb_file