Run 'setup_repositories' task on all nodes
Change-Id: I111292a6a5a1eb9038906b73e19dce90f46d60f0 Closes-Bug: #1536805
This commit is contained in:
parent
871f388255
commit
8084c47946
@ -1,7 +1,7 @@
|
|||||||
- id: setup_repositories
|
- id: setup_repositories
|
||||||
type: puppet
|
type: puppet
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
groups: [primary-controller, controller, compute, compute-vmware, cinder, cinder-block-device, cinder-vmware, primary-mongo, mongo, ceph-osd, virt, ironic]
|
groups: ['/.*/']
|
||||||
requires: [hiera]
|
requires: [hiera]
|
||||||
required_for: [fuel_pkgs]
|
required_for: [fuel_pkgs]
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -40,6 +40,9 @@ class DeploymentGraph(object):
|
|||||||
|
|
||||||
if 'groups' in task:
|
if 'groups' in task:
|
||||||
for req in task['groups']:
|
for req in task['groups']:
|
||||||
|
# check if group is defined as regular expression
|
||||||
|
if req.startswith('/'):
|
||||||
|
continue
|
||||||
graph.add_edge(task_id, req)
|
graph.add_edge(task_id, req)
|
||||||
if 'tasks' in task:
|
if 'tasks' in task:
|
||||||
for req in task['tasks']:
|
for req in task['tasks']:
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
|
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
import yaml
|
import yaml
|
||||||
@ -266,7 +267,7 @@ class TaskGraph(object):
|
|||||||
self.graph.add_edge(id_from, id_to, options)
|
self.graph.add_edge(id_from, id_to, options)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def filter_nodes(node, filter=None):
|
def filter_nodes(node_id, node, filter=None):
|
||||||
# if group is not specified accept only the group tasks
|
# if group is not specified accept only the group tasks
|
||||||
# and show only them on the graph/list
|
# and show only them on the graph/list
|
||||||
# if there is a group, filter out group tasks
|
# if there is a group, filter out group tasks
|
||||||
@ -291,6 +292,11 @@ class TaskGraph(object):
|
|||||||
if 'groups' in node:
|
if 'groups' in node:
|
||||||
if ('*' in node['groups']) or (filter in node['groups']):
|
if ('*' in node['groups']) or (filter in node['groups']):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
for group in node['groups']:
|
||||||
|
pattern = re.compile(group.strip('/'))
|
||||||
|
if pattern.match(node_id):
|
||||||
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def process_data(self):
|
def process_data(self):
|
||||||
@ -340,7 +346,8 @@ class TaskGraph(object):
|
|||||||
|
|
||||||
def filter_processed_data(self, filter=None):
|
def filter_processed_data(self, filter=None):
|
||||||
for node_id in self.data.keys():
|
for node_id in self.data.keys():
|
||||||
if not self.filter_nodes(self.data[node_id], filter=filter):
|
if not self.filter_nodes(node_id, self.data[node_id],
|
||||||
|
filter=filter):
|
||||||
self.data.pop(node_id)
|
self.data.pop(node_id)
|
||||||
|
|
||||||
def build_graph(self):
|
def build_graph(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user