From f23cdca3967a21cfa85b95d42494aae16f1bd396 Mon Sep 17 00:00:00 2001 From: Paul Van Eck Date: Mon, 6 Jul 2015 17:08:07 -0700 Subject: [PATCH] Add .gitreview & fix puppet-lint errors/warnings There were mainly alignment issues with =>, so those were fixed. Also removed the charset declaration in mysql.pp as refstack itself now takes care of this. Change-Id: Ia1635bfe51669000374fd445d460081551cb978d --- .gitreview | 4 ++++ manifests/apache/http.pp | 28 ++++++++++++++-------------- manifests/apache/https.pp | 30 +++++++++++++++--------------- manifests/api.pp | 18 +++++++++--------- manifests/app.pp | 2 +- manifests/init.pp | 8 ++++---- manifests/mysql.pp | 3 +-- vagrant.pp | 6 +++--- 8 files changed, 51 insertions(+), 48 deletions(-) create mode 100644 .gitreview diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..e18ccdb --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=openstack-infra/puppet-refstack.git diff --git a/manifests/apache/http.pp b/manifests/apache/http.pp index b862081..aff1fbb 100644 --- a/manifests/apache/http.pp +++ b/manifests/apache/http.pp @@ -39,27 +39,27 @@ class refstack::apache::http () { # Create a copy of the wsgi file with apache user permissions. file { '/etc/refstack/app.wsgi': - ensure => present, - owner => $::apache::params::user, - group => $::apache::params::group, - mode => '0644', + ensure => present, + owner => $::apache::params::user, + group => $::apache::params::group, + mode => '0644', source => "${src_www_root}/refstack/api/app.wsgi", - require => [ + require => [ Class['refstack::api'] ], - notify => Service['httpd'], + notify => Service['httpd'], } # Synchronize the app directory and the apache directory. file { $install_www_root: - ensure => directory, - owner => $::apache::params::user, - group => $::apache::params::group, - source => "${src_www_root}/refstack-ui/app", - recurse => true, - purge => true, - force => true, - notify => Service['httpd'], + ensure => directory, + owner => $::apache::params::user, + group => $::apache::params::group, + source => "${src_www_root}/refstack-ui/app", + recurse => true, + purge => true, + force => true, + notify => Service['httpd'], } # Set up refstack as HTTP diff --git a/manifests/apache/https.pp b/manifests/apache/https.pp index 4c817e2..5290fe1 100644 --- a/manifests/apache/https.pp +++ b/manifests/apache/https.pp @@ -31,7 +31,7 @@ class refstack::apache::https () { $group = $::refstack::params::group $server_admin = $::refstack::params::server_admin $python_version = $::refstack::params::python_version - + $ssl_cert_content = $::refstack::params::ssl_cert_content $ssl_cert = $::refstack::params::ssl_cert $ssl_key_content = $::refstack::params::ssl_key_content @@ -46,15 +46,15 @@ class refstack::apache::https () { # Create a copy of the wsgi file with apache user permissions. file { '/etc/refstack/app.wsgi': - ensure => present, - owner => $::apache::params::user, - group => $::apache::params::group, - mode => '0644', + ensure => present, + owner => $::apache::params::user, + group => $::apache::params::group, + mode => '0644', source => "${src_www_root}/refstack/api/app.wsgi", - require => [ + require => [ Class['refstack::api'] ], - notify => Service['httpd'], + notify => Service['httpd'], } if $ssl_cert_content != undef { @@ -89,14 +89,14 @@ class refstack::apache::https () { # Synchronize the app directory and the apache directory. file { $install_www_root: - ensure => directory, - owner => $::apache::params::user, - group => $::apache::params::group, - source => "${src_www_root}/refstack-ui/app", - recurse => true, - purge => true, - force => true, - notify => Service['httpd'], + ensure => directory, + owner => $::apache::params::user, + group => $::apache::params::group, + source => "${src_www_root}/refstack-ui/app", + recurse => true, + purge => true, + force => true, + notify => Service['httpd'], } # Set up ::refstack as HTTPS diff --git a/manifests/api.pp b/manifests/api.pp index 5347e50..9947052 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -80,20 +80,20 @@ class refstack::api () { # Create the install directory and virtual environment file { $install_api_root: - ensure => directory, - owner => $user, - group => $group, + ensure => directory, + owner => $user, + group => $group, } python::virtualenv { $install_api_root: - ensure => present, - version => $python_version, - owner => $user, - group => $group, - require => [ + ensure => present, + version => $python_version, + owner => $user, + group => $group, + require => [ File[$install_api_root], Class['python::install'], ], - systempkgs => true, + systempkgs => true, } # Run pip from the venv, install refstack. diff --git a/manifests/app.pp b/manifests/app.pp index 67f3cfe..413d655 100644 --- a/manifests/app.pp +++ b/manifests/app.pp @@ -68,7 +68,7 @@ class refstack::app () { # Run NPM Install exec { 'npm install': command => 'npm install', - path => "/usr/local/bin:/usr/bin:/bin/", + path => '/usr/local/bin:/usr/bin:/bin/', cwd => $src_www_root, user => $user, group => $group, diff --git a/manifests/init.pp b/manifests/init.pp index 10d9010..83d36b6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -27,10 +27,10 @@ class refstack ( # Configure the entire refstack instance. This does not install anything, # but ensures that variables are consistent across all modules. class { '::refstack::params': - mysql_database => $mysql_database, - mysql_user => $mysql_user, - mysql_user_password => $mysql_user_password, - hostname => $hostname + mysql_database => $mysql_database, + mysql_user => $mysql_user, + mysql_user_password => $mysql_user_password, + hostname => $hostname } include ::refstack::mysql diff --git a/manifests/mysql.pp b/manifests/mysql.pp index 670dbb1..33ae9be 100644 --- a/manifests/mysql.pp +++ b/manifests/mysql.pp @@ -35,6 +35,5 @@ class refstack::mysql () { password => $mysql_user_password, host => 'localhost', grant => ['all'], - charset => 'latin1', #TODO(krotscheck):Remove once 176364 merges } -} \ No newline at end of file +} diff --git a/vagrant.pp b/vagrant.pp index c08902c..dad0e00 100644 --- a/vagrant.pp +++ b/vagrant.pp @@ -1,6 +1,6 @@ node default { class { 'refstack': - hostname => '192.168.99.88', - mysql_user_password => 'refstack', + hostname => '192.168.99.88', + mysql_user_password => 'refstack', } -} \ No newline at end of file +}