diff options
Diffstat (limited to 'firstboot')
-rw-r--r-- | firstboot/os-net-config-mappings.yaml | 6 | ||||
-rw-r--r-- | firstboot/userdata_default.yaml | 2 | ||||
-rw-r--r-- | firstboot/userdata_dev_rsync.yaml | 2 | ||||
-rw-r--r-- | firstboot/userdata_example.yaml | 2 | ||||
-rw-r--r-- | firstboot/userdata_heat_admin.yaml | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/firstboot/os-net-config-mappings.yaml b/firstboot/os-net-config-mappings.yaml index 833c3bc2..d7e0c524 100644 --- a/firstboot/os-net-config-mappings.yaml +++ b/firstboot/os-net-config-mappings.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-10-15 +heat_template_version: ocata description: > Configure os-net-config mappings for specific nodes @@ -38,7 +38,7 @@ resources: str_replace: template: | #!/bin/sh - eth_addr=$(/sbin/ifconfig eth0 | grep ether | awk '{print $2}') + eth_addr=$(cat /sys/class/net/*/address | tr '\n' ',') mkdir -p /etc/os-net-config # Create an os-net-config mapping file, note this defaults to @@ -51,7 +51,7 @@ resources: input = sys.stdin.readline() or '{}' data = json.loads(input) for node in data: - if '${eth_addr}' in data[node].values(): + if any(x in '$eth_addr'.split(',') for x in data[node].values()): interface_mapping = {'interface_mapping': data[node]} with open('/etc/os-net-config/mapping.yaml', 'w') as f: yaml.safe_dump(interface_mapping, f, default_flow_style=False) diff --git a/firstboot/userdata_default.yaml b/firstboot/userdata_default.yaml index 140d2bf8..bc379f4c 100644 --- a/firstboot/userdata_default.yaml +++ b/firstboot/userdata_default.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: ocata description: > This is a default no-op template which provides empty user-data diff --git a/firstboot/userdata_dev_rsync.yaml b/firstboot/userdata_dev_rsync.yaml index 7dc7bd4d..d412b93a 100644 --- a/firstboot/userdata_dev_rsync.yaml +++ b/firstboot/userdata_dev_rsync.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: ocata description: > This is first boot configuration for development purposes. It allows diff --git a/firstboot/userdata_example.yaml b/firstboot/userdata_example.yaml index a0d8c7ac..a352093f 100644 --- a/firstboot/userdata_example.yaml +++ b/firstboot/userdata_example.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2014-10-16 +heat_template_version: ocata # NOTE: You don't need to pass the parameter explicitly from the # parent template, it can be specified via the parameter_defaults diff --git a/firstboot/userdata_heat_admin.yaml b/firstboot/userdata_heat_admin.yaml index 63d5bbf8..ed8302dc 100644 --- a/firstboot/userdata_heat_admin.yaml +++ b/firstboot/userdata_heat_admin.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2016-10-14 +heat_template_version: ocata parameters: # Can be overridden via parameter_defaults in the environment |