The hostname must be FQDN when using "host" module by satellite ansible collection
Environment
- Satellite ansible collection =< 2.1.2
- Red Hat satellite 6
Issue
- When performing any action using "host" module by satellite ansible collection , the name must be FQDN.
- Using FQDN is incompatible if you set your satellite to use append_domain_name_for_hosts false.
Resolution
- Workedarround can be applied by commenting lines 460-461 on file ./redhat/satellite/plugins/modules/host.py of the collection until this Bugzilla is fixed :
# additional param validation
if '.' not in module.foreman_params['name']:
module.fail_json(msg="The hostname must be FQDN")
Root Cause
- The host module enforces having dot '.' in the name of the hosts .
Diagnostic Steps
1) Set append_domain_name_for_hosts false in Administrator -> Settings -> General on satellite.
2) Perform actions on a host using the satellite ansible collection :
fatal: [SATELLITE]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "The hostname must be FQDN"}
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments