Alexandros Kosiaris has uploaded a new change for review. https://gerrit.wikimedia.org/r/179487
Change subject: Delete the install-server::caching-proxy class ...................................................................... Delete the install-server::caching-proxy class No reason for a class that only includes another class, move that squid3 class definition in the role and the configuration file alongside it. Update RSpec, tests and while at it fix an omission in RSpec Change-Id: I3cca79d0db40eb10c5ce17c8d29a350a84d89643 --- R files/caching-proxy/squid3-apt-proxy.conf M manifests/role/install-server.pp D modules/install-server/manifests/caching-proxy.pp D modules/install-server/spec/classes/install_server_caching_proxy_spec.rb M modules/install-server/spec/classes/install_server_tftp_server_spec.rb D modules/install-server/tests/caching-proxy.pp 6 files changed, 3 insertions(+), 38 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/87/179487/1 diff --git a/modules/install-server/files/squid3-apt-proxy.conf b/files/caching-proxy/squid3-apt-proxy.conf similarity index 100% rename from modules/install-server/files/squid3-apt-proxy.conf rename to files/caching-proxy/squid3-apt-proxy.conf diff --git a/manifests/role/install-server.pp b/manifests/role/install-server.pp index 8d07909..3647bb3 100644 --- a/manifests/role/install-server.pp +++ b/manifests/role/install-server.pp @@ -46,7 +46,9 @@ rule => 'proto udp dport tftp { saddr $ALL_NETWORKS ACCEPT; }' } - include install-server::caching-proxy + class { 'squid3': + config_source => 'puppet:///files/caching-proxy/squid3-apt-proxy.conf', + } ferm::rule { 'proxy': rule => 'proto tcp dport 8080 { saddr $ALL_NETWORKS ACCEPT; }' } diff --git a/modules/install-server/manifests/caching-proxy.pp b/modules/install-server/manifests/caching-proxy.pp deleted file mode 100644 index 9edc50d..0000000 --- a/modules/install-server/manifests/caching-proxy.pp +++ /dev/null @@ -1,19 +0,0 @@ -# Class: install-server::caching-proxy -# -# This class installs squid and configures it -# -# Parameters: -# -# Actions: -# Install squid and configure it as a caching forward proxy -# -# Requires: -# -# Sample Usage: -# include install-server::caching-proxy - -class install-server::caching-proxy { - class { 'squid3': - config_source => 'puppet:///modules/install-server/squid3-apt-proxy.conf', - } -} diff --git a/modules/install-server/spec/classes/install_server_caching_proxy_spec.rb b/modules/install-server/spec/classes/install_server_caching_proxy_spec.rb deleted file mode 100644 index 5d61797..0000000 --- a/modules/install-server/spec/classes/install_server_caching_proxy_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'spec_helper' - -describe 'install-server::caching-proxy', :type => :class do - it 'should have squid' do - contain_package('squid3').with_ensure('present') - contain_service('squid3').with_ensure('running') - - should contain_file('/etc/squid3/squid.conf').with({ - 'ensure' => 'present', - 'mode' => '0444', - 'owner' => 'root', - 'group' => 'root', - }).without_path() - end -end diff --git a/modules/install-server/spec/classes/install_server_tftp_server_spec.rb b/modules/install-server/spec/classes/install_server_tftp_server_spec.rb index dc3cafd..192224b 100644 --- a/modules/install-server/spec/classes/install_server_tftp_server_spec.rb +++ b/modules/install-server/spec/classes/install_server_tftp_server_spec.rb @@ -3,7 +3,6 @@ describe 'install-server::tftp-server', :type => :class do it { should contain_package('atftpd').with_ensure('latest') } - it { should contain_package('openbsd-inetd').with_ensure('purged') } it do should contain_file('/etc/default/atftpd').with({ diff --git a/modules/install-server/tests/caching-proxy.pp b/modules/install-server/tests/caching-proxy.pp deleted file mode 100644 index 2e50537..0000000 --- a/modules/install-server/tests/caching-proxy.pp +++ /dev/null @@ -1,2 +0,0 @@ -# -include install-server::caching-proxy -- To view, visit https://gerrit.wikimedia.org/r/179487 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3cca79d0db40eb10c5ce17c8d29a350a84d89643 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits