Merge "Sanitize the uuid string for ceph-ansible"

This commit is contained in:
Zuul 2019-02-11 19:12:52 +00:00 committed by Gerrit Code Review
commit 0338a8f0cb
1 changed files with 2 additions and 1 deletions

View File

@ -446,7 +446,8 @@ outputs:
set_fact:
nodes_data: "{% raw %}{{ lookup('file','./nodes_uuid_data.json') | from_json }}{% endraw %}"
- name: register machine id
command: dmidecode -s system-uuid | tr A-F a-f
# awk strips unwanted output, see LP bug #1762460
shell: 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 A-F a-f
register: machine_uuid
# NOTE(tonyb): 0 == no error, 1 == -EPERM or bad data and 2 == Command not found
# 1 and 2 aren't great but shouldn't cause the deploy to fail. If we're using