Add hiera yaml override file
This commit is contained in:
parent
af7b4a5f7b
commit
f562a53487
|
@ -0,0 +1,4 @@
|
|||
.tox
|
||||
.build
|
||||
*.pyc
|
||||
*.rpm
|
|
@ -0,0 +1,43 @@
|
|||
# Copyright 2016 Mirantis, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
notice('fuel-plugin-rally: rally_hiera_override.pp')
|
||||
|
||||
# maybe fo future use
|
||||
$network_scheme = hiera_hash('network_scheme')
|
||||
$network_metadata = hiera_hash('network_metadata')
|
||||
prepare_network_config($network_scheme)
|
||||
|
||||
$rally = hiera_hash('fuel-plugin-rally', undef)
|
||||
$management_ip = get_network_role_property('management', 'ipaddr')
|
||||
|
||||
$hiera_dir = '/etc/hiera/override'
|
||||
$plugin_name = 'rally'
|
||||
$plugin_yaml = "${plugin_name}.yaml"
|
||||
|
||||
|
||||
$calculated_content = inline_template('
|
||||
---
|
||||
rally::rally_configuration: <%= @rally["rally_configuration"] %>
|
||||
rally::listen_address: <%= @management_ip %>
|
||||
')
|
||||
|
||||
###################
|
||||
file {'/etc/hiera/override':
|
||||
ensure => directory,
|
||||
} ->
|
||||
file { "${hiera_dir}/${plugin_yaml}":
|
||||
ensure => file,
|
||||
content => "${calculated_content}\n",
|
||||
}
|
|
@ -14,6 +14,7 @@
|
|||
- logging
|
||||
- netconfig
|
||||
- hosts
|
||||
- rally-hiera
|
||||
- puppet-demo
|
||||
requires: [deploy_start]
|
||||
required_for: [deploy_end]
|
||||
|
@ -22,6 +23,23 @@
|
|||
type: one_by_one
|
||||
|
||||
|
||||
# Tasks definitions for the deployment
|
||||
######################################
|
||||
|
||||
# This task needs to be reexecuted to adapt the configuration parameters which
|
||||
# depend on the number of nodes in the cluster
|
||||
- id: rally-hiera
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
requires: [netconfig]
|
||||
required_for: [deploy_end]
|
||||
parameters:
|
||||
puppet_manifest: "puppet/manifests/rally_hiera_override.pp"
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 120
|
||||
reexecute_on:
|
||||
- deploy_changes
|
||||
|
||||
- id: puppet-demo
|
||||
type: puppet
|
||||
version: 2.0.0
|
||||
|
|
Loading…
Reference in New Issue