diff --git a/etc/rpc_deploy/user_variables.yml b/etc/rpc_deploy/user_variables.yml index 4db1af0ff6..c2a0d73dd4 100644 --- a/etc/rpc_deploy/user_variables.yml +++ b/etc/rpc_deploy/user_variables.yml @@ -112,7 +112,10 @@ maas_monitoring_zones: - mzlon - mzhkg maas_repo_version: v9.0.0 - +# Specify the maas_fqdn_extension, defaults to empty string. +# This will be appended to the inventory_name of a host for MaaS purposes. +# The inventory name + maas_fqdn_extension must match the entity name in MaaS +# maas_fqdn_extension: .example.com ## Neutron Options neutron_container_mysql_password: diff --git a/rpc_deployment/playbooks/monitoring/raxmon-setup.yml b/rpc_deployment/playbooks/monitoring/raxmon-setup.yml index 226bfa4e08..3955c3e595 100644 --- a/rpc_deployment/playbooks/monitoring/raxmon-setup.yml +++ b/rpc_deployment/playbooks/monitoring/raxmon-setup.yml @@ -20,7 +20,7 @@ - raxmon_cli - raxmon_agent_install vars: - entity_name: "{{ inventory_hostname }}" + entity_name: "{{ inventory_hostname }}{{ maas_fqdn_extension|default('') }}" - hosts: keystone[0] user: root diff --git a/rpc_deployment/roles/maas_dell_hardware/tasks/main.yml b/rpc_deployment/roles/maas_dell_hardware/tasks/main.yml index bd8e6fe2b8..70d0a617e5 100644 --- a/rpc_deployment/roles/maas_dell_hardware/tasks/main.yml +++ b/rpc_deployment/roles/maas_dell_hardware/tasks/main.yml @@ -14,7 +14,7 @@ # limitations under the License. - name: Get entity ID for physical_host - shell: raxmon-entities-list | grep "label={{ inventory_hostname|quote }} " | sed -e 's/^.* id=\(.*\) label=.*$/\1/g' + shell: raxmon-entities-list | grep "label={{ inventory_hostname|quote }}{{ maas_fqdn_extension|default('') }} " | sed -e 's/^.* id=\(.*\) label=.*$/\1/g' register: entity_id - name: Validate if check exists diff --git a/rpc_deployment/roles/maas_local/tasks/main.yml b/rpc_deployment/roles/maas_local/tasks/main.yml index ebd3965a4b..668806eec7 100644 --- a/rpc_deployment/roles/maas_local/tasks/main.yml +++ b/rpc_deployment/roles/maas_local/tasks/main.yml @@ -14,7 +14,7 @@ # limitations under the License. - name: Get entity ID for physical_host - shell: raxmon-entities-list | grep "label={{ physical_host|quote }} " | sed -e 's/^.* id=\(.*\) label=.*$/\1/g' + shell: raxmon-entities-list | grep "label={{ physical_host|quote }}{{ maas_fqdn_extension|default('') }} " | sed -e 's/^.* id=\(.*\) label=.*$/\1/g' register: entity_id delegate_to: "{{ physical_host }}"