File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
environments/common/inventory/group_vars/all Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,14 @@ def readfile(fpath):
3535def exists (fpath ):
3636 return os .path .isfile (fpath )
3737
38- def to_regex (items ):
38+ def to_ood_regex (items ):
3939 """ Convert a list of strings possibly containing digits into a regex containing \d+
4040
4141 eg {{ [compute-001, compute-002, control] | to_regex }} -> '(compute-\d+)|(control)'
4242 """
4343
4444 # There's a python bug which means re.sub() can't use '\d' in the replacement so
45- # ave to do replacement in two stages:
45+ # have to do replacement in two stages:
4646 r = [re .sub (r"\d+" , 'XBACKSLASHX' , v ) for v in items ]
4747 r = [v .replace ('XBACKSLASHX' , '\d+' ) for v in set (r )]
4848 r = ['(%s)' % v for v in r ]
@@ -62,5 +62,5 @@ def filters(self):
6262 'prometheus_node_exporter_targets' : prometheus_node_exporter_targets ,
6363 'exists' : exists ,
6464 'warn' : self .warn ,
65- 'to_regex ' : to_regex
65+ 'to_ood_regex ' : to_ood_regex ,
6666 }
Original file line number Diff line number Diff line change 1010# regex defining hosts which openondemand can proxy; the default regex is compute nodes (for apps) and grafana host.
1111# the autogenerated regex may need overriding if compute nodes names do not contain numbers in a consistent position or
1212# or include regex special characters.
13- openondemand_host_regex : " {{ (groups['compute'] + groups['grafana']) | to_regex }}"
13+ openondemand_host_regex : " {{ (groups['compute'] + groups['grafana']) | to_ood_regex }}"
1414
1515ondemand_package : ondemand-2.0.29
1616
You can’t perform that action at this time.
0 commit comments