Add Puppet 4.x lint checks
The puppet-lint requirement is now changed, so we can use puppet-lint plugins. Most of these plugins are for 4.x compat, but some just catch common errors. Change-Id: I988929331e3f0cbef5e10ec9116cdba9ded16967
This commit is contained in:
parent
7e40d487d8
commit
c453d7f313
9
Gemfile
9
Gemfile
@ -6,6 +6,15 @@ group :development, :test do
|
||||
|
||||
gem 'metadata-json-lint'
|
||||
gem 'puppet-lint-param-docs'
|
||||
gem 'puppet-lint-absolute_classname-check'
|
||||
gem 'puppet-lint-absolute_template_path'
|
||||
gem 'puppet-lint-trailing_newline-check'
|
||||
|
||||
# Puppet 4.x related lint checks
|
||||
gem 'puppet-lint-unquoted_string-check'
|
||||
gem 'puppet-lint-leading_zero-check'
|
||||
gem 'puppet-lint-variable_contains_upcase'
|
||||
gem 'puppet-lint-numericvariable'
|
||||
|
||||
gem 'json'
|
||||
gem 'webmock'
|
||||
|
@ -20,11 +20,11 @@
|
||||
|
||||
Exec { logoutput => 'on_failure' }
|
||||
|
||||
class { 'mysql::server': }
|
||||
class { 'keystone::db::mysql':
|
||||
class { '::mysql::server': }
|
||||
class { '::keystone::db::mysql':
|
||||
password => 'keystone',
|
||||
}
|
||||
class { 'keystone':
|
||||
class { '::keystone':
|
||||
verbose => true,
|
||||
debug => true,
|
||||
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
|
||||
@ -32,18 +32,18 @@ class { 'keystone':
|
||||
admin_token => 'admin_token',
|
||||
enabled => false,
|
||||
}
|
||||
class { 'keystone::roles::admin':
|
||||
class { '::keystone::roles::admin':
|
||||
email => 'test@puppetlabs.com',
|
||||
password => 'ChangeMe',
|
||||
}
|
||||
class { 'keystone::endpoint':
|
||||
class { '::keystone::endpoint':
|
||||
public_url => "https://${::fqdn}:5000/",
|
||||
admin_url => "https://${::fqdn}:35357/",
|
||||
}
|
||||
|
||||
keystone_config { 'ssl/enable': value => true }
|
||||
|
||||
include apache
|
||||
class { 'keystone::wsgi::apache':
|
||||
include ::apache
|
||||
class { '::keystone::wsgi::apache':
|
||||
ssl => true
|
||||
}
|
||||
|
@ -20,11 +20,11 @@
|
||||
|
||||
Exec { logoutput => 'on_failure' }
|
||||
|
||||
class { 'mysql::server': }
|
||||
class { 'keystone::db::mysql':
|
||||
class { '::mysql::server': }
|
||||
class { '::keystone::db::mysql':
|
||||
password => 'keystone',
|
||||
}
|
||||
class { 'keystone':
|
||||
class { '::keystone':
|
||||
verbose => true,
|
||||
debug => true,
|
||||
database_connection => 'mysql://keystone_admin:keystone@127.0.0.1/keystone',
|
||||
@ -32,20 +32,20 @@ class { 'keystone':
|
||||
admin_token => 'admin_token',
|
||||
enabled => true,
|
||||
}
|
||||
class { 'keystone::cron::token_flush': }
|
||||
class { 'keystone::roles::admin':
|
||||
class { '::keystone::cron::token_flush': }
|
||||
class { '::keystone::roles::admin':
|
||||
email => 'test@puppetlabs.com',
|
||||
password => 'ChangeMe',
|
||||
}
|
||||
class { 'keystone::endpoint':
|
||||
class { '::keystone::endpoint':
|
||||
public_url => "https://${::fqdn}:443/main/",
|
||||
admin_address => "https://${::fqdn}:443/admin/",
|
||||
}
|
||||
|
||||
keystone_config { 'ssl/enable': ensure => absent }
|
||||
|
||||
include apache
|
||||
class { 'keystone::wsgi::apache':
|
||||
include ::apache
|
||||
class { '::keystone::wsgi::apache':
|
||||
ssl => true,
|
||||
public_port => 443,
|
||||
admin_port => 443,
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
# Ensure this matches what is in LDAP or keystone will try to recreate
|
||||
# the admin user
|
||||
class { 'keystone::roles::admin':
|
||||
class { '::keystone::roles::admin':
|
||||
email => 'test@example.com',
|
||||
password => 'ChangeMe',
|
||||
}
|
||||
@ -15,7 +15,7 @@ class { 'keystone::roles::admin':
|
||||
# ldapsearch -v -x -H 'ldap://example.com:389' -D \
|
||||
# "uid=bind,cn=users,cn=accounts,dc=example,dc=com" -w SecretPass \
|
||||
# -b cn=users,cn=accounts,dc=example,dc=com
|
||||
class { 'keystone:ldap':
|
||||
class { '::keystone:ldap':
|
||||
url => 'ldap://ldap.example.com:389',
|
||||
user => 'uid=bind,cn=users,cn=accounts,dc=example,dc=com',
|
||||
password => 'SecretPass',
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
# Ensure this matches what is in LDAP or keystone will try to recreate
|
||||
# the admin user
|
||||
class { 'keystone::roles::admin':
|
||||
class { '::keystone::roles::admin':
|
||||
email => 'test@example.com',
|
||||
password => 'ChangeMe',
|
||||
}
|
||||
@ -11,7 +11,7 @@ class { 'keystone::roles::admin':
|
||||
# You can test this connection with ldapsearch first to ensure it works.
|
||||
# This was tested against a FreeIPA box, you will likely need to change the
|
||||
# attributes to match your configuration.
|
||||
class { 'keystone:ldap':
|
||||
class { '::keystone:ldap':
|
||||
identity_driver => 'keystone.identity.backends.ldap.Identity',
|
||||
url => 'ldap://ldap.example.com:389',
|
||||
user => 'uid=bind,cn=users,cn=accounts,dc=example,dc=com',
|
||||
|
@ -477,7 +477,7 @@ class keystone(
|
||||
name => $::keystone::params::package_name,
|
||||
tag => 'openstack',
|
||||
}
|
||||
class { 'openstacklib::openstackclient':
|
||||
class { '::openstacklib::openstackclient':
|
||||
package_ensure => $client_package_ensure,
|
||||
}
|
||||
|
||||
@ -763,7 +763,7 @@ class keystone(
|
||||
$v_auth_url = $admin_endpoint
|
||||
}
|
||||
|
||||
class { 'keystone::service':
|
||||
class { '::keystone::service':
|
||||
ensure => $service_ensure,
|
||||
service_name => $::keystone::params::service_name,
|
||||
enable => $enabled,
|
||||
@ -777,7 +777,7 @@ class keystone(
|
||||
cacert => $validate_cacert,
|
||||
}
|
||||
} else {
|
||||
class { 'keystone::service':
|
||||
class { '::keystone::service':
|
||||
ensure => $service_ensure,
|
||||
service_name => $::keystone::params::service_name,
|
||||
enable => $enabled,
|
||||
|
@ -78,7 +78,7 @@ class keystone::service(
|
||||
$insecure = false,
|
||||
$cacert = undef,
|
||||
) {
|
||||
include keystone::params
|
||||
include ::keystone::params
|
||||
|
||||
service { 'keystone':
|
||||
ensure => $ensure,
|
||||
|
@ -5,36 +5,36 @@ package { 'curl': ensure => present }
|
||||
# example of how to build a single node
|
||||
# keystone instance backed by sqlite
|
||||
# with all of the default admin roles
|
||||
node keystone_sqlite {
|
||||
class { 'keystone':
|
||||
node 'keystone_sqlite' {
|
||||
class { '::keystone':
|
||||
verbose => true,
|
||||
debug => true,
|
||||
catalog_type => 'sql',
|
||||
admin_token => 'admin_token',
|
||||
}
|
||||
class { 'keystone::roles::admin':
|
||||
class { '::keystone::roles::admin':
|
||||
email => 'example@abc.com',
|
||||
password => 'ChangeMe',
|
||||
}
|
||||
class { 'keystone::endpoint':
|
||||
class { '::keystone::endpoint':
|
||||
public_url => "http://${::fqdn}:5000/",
|
||||
admin_url => "http://${::fqdn}:35357/",
|
||||
}
|
||||
}
|
||||
|
||||
node keystone_mysql {
|
||||
class { 'mysql::server': }
|
||||
class { 'keystone::db::mysql':
|
||||
class { '::mysql::server': }
|
||||
class { '::keystone::db::mysql':
|
||||
password => 'keystone',
|
||||
}
|
||||
class { 'keystone':
|
||||
class { '::keystone':
|
||||
verbose => true,
|
||||
debug => true,
|
||||
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
|
||||
catalog_type => 'sql',
|
||||
admin_token => 'admin_token',
|
||||
}
|
||||
class { 'keystone::roles::admin':
|
||||
class { '::keystone::roles::admin':
|
||||
email => 'test@puppetlabs.com',
|
||||
password => 'ChangeMe',
|
||||
}
|
||||
@ -43,21 +43,21 @@ node keystone_mysql {
|
||||
|
||||
# keystone with mysql on another node
|
||||
node keystone {
|
||||
class { 'keystone':
|
||||
class { '::keystone':
|
||||
verbose => true,
|
||||
debug => true,
|
||||
database_connection => 'mysql://keystone:password@127.0.0.1/keystone',
|
||||
catalog_type => 'sql',
|
||||
admin_token => 'admin_token',
|
||||
}
|
||||
class { 'keystone::db::mysql':
|
||||
class { '::keystone::db::mysql':
|
||||
password => 'keystone',
|
||||
}
|
||||
class { 'keystone::roles::admin':
|
||||
class { '::keystone::roles::admin':
|
||||
email => 'example@abc.com',
|
||||
password => 'ChangeMe',
|
||||
}
|
||||
class { 'keystone::endpoint':
|
||||
class { '::keystone::endpoint':
|
||||
public_url => "http://${::fqdn}:5000/",
|
||||
admin_url => "http://${::fqdn}:35357/",
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user