And the new AWS host also failed.

TASK: [ansible-ipaserver | Hard set the hostname] 
***************************** 
failed: [216.125.253.72] => {"failed": true}
msg: hostname module cannot be used on platform Linux (Centos linux)
failed: [52.10.173.105] => {"failed": true}
msg: hostname module cannot be used on platform Linux (Centos linux)
failed: [52.34.74.143] => {"failed": true}
msg: hostname module cannot be used on platform Linux (Centos linux)

Python output:
>>> print(platform.system())
Linux
>>> print(platform.dist())
('centos', '7.1.1503', 'Core')
>>> print(platform.linux_distribution())
('CentOS Linux', '7.1.1503', 'Core')



On Friday, November 13, 2015 at 3:40:44 PM UTC-6, Joanna Delaporte wrote:
>
> I was wrong about CentOS 7.1 not being available...it is now the CentOS 
> version you can get on AWS, as of fairly recently. I am about to test it 
> now.
>
> On Friday, November 13, 2015 at 3:18:40 PM UTC-6, Joanna Delaporte wrote:
>>
>> Interestingly, my ubuntu laptop also responds with just "Linux" to the 
>> platform.system() call. 
>>
>> Unfortunately, it appears that I cannot get CentOS 7.1 yet on AWS...I 
>> think Gregswift mentioned that worked for him today. I could test it next 
>> week at work with a physical install to identify the issue further, if 
>> that's helpful.
>>
>> On Friday, November 13, 2015 at 3:10:19 PM UTC-6, Joanna Delaporte wrote:
>>>
>>> HI Brian, 
>>>
>>> Thanks! Both hosts had the same responses. Here's the result:
>>>
>>> >>> print(platform.system())
>>> Linux
>>> >>> print(platform.linux_distribution())
>>> ('CentOS Linux', '7.0.1406', 'Core')
>>> >>> print(platform.dist())
>>> ('centos', '7.0.1406', 'Core')
>>>
>>> So, if the module is first looking at platform.system and taking any 
>>> answer it receives, the only answer the module receives from this 
>>> distribution version is "Linux".
>>>
>>> On Friday, November 13, 2015 at 1:41:24 PM UTC-6, Brian Coca wrote:
>>>>
>>>> the 'magic' gets done in the load_platform_subclass, which matches the 
>>>> platform name to a class of the same name + Hostname, which then sets 
>>>> the strategy class, which actually implements the way of updating 
>>>> hostname. 
>>>>
>>>> to figure out platform name it uses platform.system() built in from 
>>>> python. can you do test the output of this in your instance? also 
>>>> platform.linux_distribution() and platform.dist() which might be used 
>>>> as fallbacks. 
>>>>
>>>> -- 
>>>> Brian Coca 
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bf3c0644-420a-46d4-9bf3-293a536cb625%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to