diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py index a400b0df8e..000f7ea2c7 100644 --- a/docker/docker-puppet.py +++ b/docker/docker-puppet.py @@ -295,6 +295,7 @@ with open(sh_script, 'w') as script_file: fi # $::deployment_type in puppet-tripleo export FACTER_deployment_type=containers + export FACTER_uuid=$(cat /sys/class/dmi/id/product_uuid | tr '[:upper:]' '[:lower:]') /usr/bin/puppet apply --summarize \ --detailed-exitcodes \ --color=false \ diff --git a/puppet/extraconfig/pre_deploy/per_node.yaml b/puppet/extraconfig/pre_deploy/per_node.yaml index 72dc050fe0..c5969fd9ae 100644 --- a/puppet/extraconfig/pre_deploy/per_node.yaml +++ b/puppet/extraconfig/pre_deploy/per_node.yaml @@ -29,7 +29,9 @@ resources: - name: node_lookup config: | #!/bin/sh - node_id=$(dmidecode --s system-uuid | awk 'match($0, /[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/) { print substr($0, RSTART, RLENGTH) }') + node_id=$(dmidecode --s system-uuid | awk 'match($0, \ + /[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/) \ + { print substr($0, RSTART, RLENGTH) }' | tr '[:upper:]' '[:lower:]') # Create a /etc/puppet/hieradata/UUID.json file to provide # the data of the NodeDataLookup parameter that matches the