Allow an fqdn extension to be specified for MaaS purposes
This allows the inventory_hostname to be specified as the shortname, and a common fqdn to applied. E.g. infra01 with an fqdn of .test.com would count towards a MaaS entity of infra01.test.com whilst the inventory for ansible would still see it as "infra01".
This commit is contained in:
parent
ff0d6e5b6a
commit
4085c5342d
@ -112,7 +112,10 @@ maas_monitoring_zones:
|
|||||||
- mzlon
|
- mzlon
|
||||||
- mzhkg
|
- mzhkg
|
||||||
maas_repo_version: v9.0.0
|
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 Options
|
||||||
neutron_container_mysql_password:
|
neutron_container_mysql_password:
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
- raxmon_cli
|
- raxmon_cli
|
||||||
- raxmon_agent_install
|
- raxmon_agent_install
|
||||||
vars:
|
vars:
|
||||||
entity_name: "{{ inventory_hostname }}"
|
entity_name: "{{ inventory_hostname }}{{ maas_fqdn_extension|default('') }}"
|
||||||
|
|
||||||
- hosts: keystone[0]
|
- hosts: keystone[0]
|
||||||
user: root
|
user: root
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Get entity ID for physical_host
|
- 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
|
register: entity_id
|
||||||
|
|
||||||
- name: Validate if check exists
|
- name: Validate if check exists
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Get entity ID for physical_host
|
- 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
|
register: entity_id
|
||||||
delegate_to: "{{ physical_host }}"
|
delegate_to: "{{ physical_host }}"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user