aboutsummaryrefslogtreecommitdiffstats
path: root/docker/docker-puppet.py
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2017-01-29 08:01:46 -0500
committerDan Prince <dprince@redhat.com>2017-02-15 13:09:59 -0500
commit84626c82cc54a0b1de595cbac06336045947dc4a (patch)
treea290af3c02f2f14eb451319aace0d5d903df2374 /docker/docker-puppet.py
parentad2ea290bed17bff9b53ac225d3604ed642ee8bc (diff)
Add docker_puppet_tasks initialization on primary node
This patch adds a new (optional) section to the docker post.j2.yaml that collects any 'docker_puppet_tasks' data from enabled services and applies it on the primary role node (the first node in the primary (first) role). The use case for this is although we are generally only using puppet for configuration there are several exceptions that we desire to make use of today for parity with baremetal. This includes things like database creation and keystone endpoint initialization which we rely on configuration via hiera variables controlled by the puppet services. Change-Id: Ic14ef48f26de761b0d0eabd0e1c0eae52d90e68a
Diffstat (limited to 'docker/docker-puppet.py')
-rwxr-xr-xdocker/docker-puppet.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py
index 2d560819..fe87ce7a 100755
--- a/docker/docker-puppet.py
+++ b/docker/docker-puppet.py
@@ -72,7 +72,9 @@ with open(config_file) as f:
configs = {}
-for service in json_data:
+for service in (json_data or []):
+ if service is None:
+ continue
config_volume = service[0] or ''
puppet_tags = service[1] or ''
manifest = service[2] or ''