Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lack of support for Cumulus Linux with Hostname module in Ansible… #57634

Open
wants to merge 1 commit into
base: stable-2.8
from

Conversation

Projects
None yet
2 participants
@ericpulvino
Copy link
Contributor

commented Jun 10, 2019

… v2.8.0. (#57493)

(cherry picked from commit 1661c87)

SUMMARY

Fixing support for Cumulus Linux in the Hostname module. This no longer worked in 2.8.0 as a result of Pull Request #52199.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

hostname

ADDITIONAL INFORMATION

Before

cumulus@oob-mgmt-server:~$ ansible -m hostname -a "name=test01" spine01
[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow 
bad characters in group names by default, this will change, but still be user 
configurable on deprecation. This feature will be removed in version 2.10. 
Deprecation warnings can be disabled by setting deprecation_warnings=False in 
ansible.cfg.
 [WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details

 [WARNING]: Platform linux on host spine01 is using the discovered Python
interpreter at /usr/bin/python, but future installation of another Python
interpreter could change this. See https://docs.ansible.com/ansible/2.8/reference_a
ppendices/interpreter_discovery.html for more information.

spine01 | FAILED! => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    }, 
    "changed": false, 
    "msg": "hostname module cannot be used on platform Linux (Cumulus-linux)"
}

After

cumulus@oob-mgmt-server:~$ ansible -m hostname -a "name=test01" spine01 -b 
[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow 
bad characters in group names by default, this will change, but still be user 
configurable on deprecation. This feature will be removed in version 2.10. 
Deprecation warnings can be disabled by setting deprecation_warnings=False in 
ansible.cfg.
 [WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details

 [WARNING]: Platform linux on host spine01 is using the discovered Python
interpreter at /usr/bin/python, but future installation of another Python
interpreter could change this. See https://docs.ansible.com/ansible/2.8/reference_a
ppendices/interpreter_discovery.html for more information.

spine01 | CHANGED => {
    "ansible_facts": {
        "ansible_domain": "", 
        "ansible_fqdn": "test01", 
        "ansible_hostname": "test01", 
        "ansible_nodename": "test01", 
        "discovered_interpreter_python": "/usr/bin/python"
    }, 
    "changed": true, 
    "name": "test01"
}
@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.