diff options
author | zsdc <taras@vyos.io> | 2021-08-11 13:46:54 +0300 |
---|---|---|
committer | zsdc <taras@vyos.io> | 2021-08-16 15:30:41 +0300 |
commit | 5231854c0a09d82aab2be13161186cba15e34178 (patch) | |
tree | 6983e2ef02437eb62f3b8a4e0b97b9c603f74f1b | |
parent | e979e3d269ce8cbdb3933a141853bb35b9ed7b74 (diff) | |
download | vyos-cloud-init-5231854c0a09d82aab2be13161186cba15e34178.tar.gz vyos-cloud-init-5231854c0a09d82aab2be13161186cba15e34178.zip |
User-Data: T3735: Fixed "multi" nodes type search
Several nodes with "multi" type contain extra space character after
the `multi:` mark, which prevents the `cc_vyos_userdata` module to
detect their type properly. This commit changes the regex used for
detecting such nodes to fix the problem.
-rw-r--r-- | cloudinit/config/cc_vyos_userdata.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/config/cc_vyos_userdata.py b/cloudinit/config/cc_vyos_userdata.py index 52313433..95ba82de 100644 --- a/cloudinit/config/cc_vyos_userdata.py +++ b/cloudinit/config/cc_vyos_userdata.py @@ -57,7 +57,7 @@ def get_multi_nodes(): # search for node.def files node_def_files = Path(TEMPLATES_DIR).rglob('node.def') # prepare filter to match multi node files - regex_filter = re.compile(r'^multi:$', re.MULTILINE) + regex_filter = re.compile(r'^multi:.*$', re.MULTILINE) # add each node.def with multi mark to list for node_def_file in node_def_files: file_content = node_def_file.read_text() |