From e3b4d7b9e5f9f284bd421f6d12be99fca8b60b20 Mon Sep 17 00:00:00 2001 From: Matthew Wagoner Date: Fri, 12 Oct 2012 12:15:23 -0400 Subject: [PATCH] Cleanup pypimirror init.pp manifest lint errors. Change-Id: I052c1cc1f4633c11b5b89390ffd9f728e99db088 Reviewed-on: https://review.openstack.org/14394 Reviewed-by: Jeremy Stanley Reviewed-by: Paul Belanger Reviewed-by: Monty Taylor Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- modules/pypimirror/manifests/init.pp | 116 ++++++++++++++------------- 1 file changed, 59 insertions(+), 57 deletions(-) diff --git a/modules/pypimirror/manifests/init.pp b/modules/pypimirror/manifests/init.pp index 29a8a728cc..e3aa6eabe1 100644 --- a/modules/pypimirror/manifests/init.pp +++ b/modules/pypimirror/manifests/init.pp @@ -1,10 +1,11 @@ -class pypimirror ( $vhost_name = $fqdn, - $log_filename = "/var/log/pypimirror.log", - $mirror_file_path = "/var/lib/pypimirror", - $pip_download = "/var/lib/pip-download", - $pip_cache = "/var/cache/pip", - $git_source = "https://github.com", - $projects = [] ) +class pypimirror( + $vhost_name = $::fqdn, + $log_filename = '/var/log/pypimirror.log', + $mirror_file_path = '/var/lib/pypimirror', + $pip_download = '/var/lib/pip-download', + $pip_cache = '/var/cache/pip', + $git_source = 'https://github.com', + $projects = [] ) { include apache @@ -16,103 +17,104 @@ class pypimirror ( $vhost_name = $fqdn, } package { 'pip': - ensure => present, + ensure => present, provider => 'pip', - require => Class[pip] + require => Class[pip] } file { '/usr/local/mirror_scripts': - ensure => 'directory', - mode => 755, - owner => 'root', - group => 'root', + ensure => directory, + mode => '0755', + owner => 'root', + group => 'root', } file { $pip_download: - ensure => 'directory', - mode => 755, - owner => 'root', - group => 'root', + ensure => directory, + mode => '0755', + owner => 'root', + group => 'root', } file { $pip_cache: - ensure => 'directory', - mode => 755, - owner => 'root', - group => 'root', + ensure => directory, + mode => '0755', + owner => 'root', + group => 'root', } file { '/etc/openstackci': - ensure => "directory", - owner => "root", + ensure => directory, + owner => 'root', } file { '/etc/openstackci/projects.yaml': - owner => 'root', - group => 'root', - mode => 444, - ensure => 'present', - source => 'puppet:///openstack_project/review.projects.yaml', + ensure => present, + owner => 'root', + group => 'root', + mode => '0444', + source => 'puppet:///openstack_project/review.projects.yaml', replace => true, } file { '/usr/local/mirror_scripts/run-mirror.sh': - ensure => present, - mode => 755, - owner => 'root', - group => 'root', + ensure => present, + mode => '0755', + owner => 'root', + group => 'root', content => template('pypimirror/run-mirror.sh.erb'), require => File['/usr/local/mirror_scripts'], } file { '/usr/local/mirror_scripts/run_mirror.py': - ensure => present, - mode => 755, - owner => 'root', - group => 'root', - source => "puppet:///modules/pypimirror/run_mirror.py", + ensure => present, + mode => '0755', + owner => 'root', + group => 'root', + source => 'puppet:///modules/pypimirror/run_mirror.py', require => File['/usr/local/mirror_scripts'], } file { '/usr/local/mirror_scripts/pull-repo.sh': - ensure => present, - mode => 755, - owner => 'root', - group => 'root', - source => "puppet:///modules/pypimirror/pull-repo.sh", + ensure => present, + mode => '0755', + owner => 'root', + group => 'root', + source => 'puppet:///modules/pypimirror/pull-repo.sh', require => File['/usr/local/mirror_scripts'], } file { '/usr/local/mirror_scripts/process_cache.py': - ensure => present, - mode => 755, - owner => 'root', - group => 'root', - source => "puppet:///modules/pypimirror/process_cache.py", + ensure => present, + mode => '0755', + owner => 'root', + group => 'root', + source => 'puppet:///modules/pypimirror/process_cache.py', require => File['/usr/local/mirror_scripts'], } # Add cron job to update the mirror - cron { "update_mirror": - user => root, - minute => "0", + cron { 'update_mirror': + user => 'root', + minute => '0', command => '/usr/local/mirror_scripts/run-mirror.sh', - require => File["/usr/local/mirror_scripts/run-mirror.sh"], + require => File['/usr/local/mirror_scripts/run-mirror.sh'], } # Rotate the mirror log file include logrotate - logrotate::file {"pypimirror": - log => $log_filename, - options => ["compress", "delaycompress", "missingok", "rotate 7", "daily", "notifempty"], - require => Cron["update_mirror"], + logrotate::file { 'pypimirror': + log => $log_filename, + options => ['compress', 'delaycompress', 'missingok', 'rotate 7', + 'daily', 'notifempty'], + require => Cron['update_mirror'], } apache::vhost { $vhost_name: - port => 80, - docroot => $mirror_file_path, + port => 80, + docroot => $mirror_file_path, priority => 50, } }