Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-17 Thread Joanna Delaporte
I did a fresh install on a new CentOS 7.1.1503. I got the same error response to the hostname module from my Slackware control machine. I installed ansible 1.9.3 and git cloned enough over to my Ubuntu 14.04 laptop to rerun the same playbook against the same CentOS 7.1 target. The error was gon

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Brian Coca
in this case the version of python on ansible machine should not matter, the module executes on the target machine. The version of ansible might matter as many changes were made to hostname module, I'm using 2.0/devel from git. -- Brian Coca -- You received this message because you are subscrib

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
What version Ansible are you using? I only have the AWS instance (no other installs) I provisioned today that's 7.1 right now, but it's the latest one to have failed. I am wondering if the version of python on my control machine would make a difference. I don't know why it would, but it's odd that

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Brian Coca
just tested on a new 7.1 vm and hostname module works w/o any issues. -- 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 ansible-project+unsubsc

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Brian Coca
So i checked again, i had misread the code it does not match class name but the declared distribution variable inside, this SHOULD match all versions of Centos. On Fri, Nov 13, 2015 at 4:01 PM, Joanna Delaporte wrote: > There's a class for 'Centos' at line 449, and another for 'Centos linux' at >

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
There's a class for 'Centos' at line 449, and another for 'Centos linux' at line 458, if you are looking at the Hostname module. On Friday, November 13, 2015 at 5:40:43 PM UTC-6, Brian Coca wrote: > > so from the code, this should work when ansible_distribution": > "CentOS" but not when ansible_

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Brian Coca
so from the code, this should work when ansible_distribution": "CentOS" but not when ansible_distribution": "CentOS Linux" -- 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 email

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
Oh, good. You found something that makes sense as a cause for this problem! I'm still not sure why it worked for Gregswift earlier, and not me, though. Joanna On Friday, November 13, 2015 at 5:09:09 PM UTC-6, Brian Coca wrote: > > he... 'CentOS Linux' != 'CentOSLinux' > > we might just need to

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Brian Coca
he... 'CentOS Linux' != 'CentOSLinux' we might just need to strip spaces in the detection. -- 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 ans

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
TASK: [ansible-ipaserver | Hard set the hostname] * failed: [2] => {"failed": true} msg: hostname module cannot be used on platform Linux (Centos linux) failed: [5] => {"failed": true} msg: hostname module cannot be used on platform Linux (Centos linux) failed

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
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 can

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
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 t

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
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 is

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
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.syste

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Brian Coca
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 y

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
Actually, it happens both on a local install of CentOS 7.0.1406 and AWS's CentOS7.0.1406. hostnamectl works fine on my AWS host. On Friday, November 13, 2015 at 1:08:20 PM UTC-6, Greg Swift wrote: > > Joanna found that it has something to do with the AWS CentOS7 install. I'm > assuming based o

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
Yes, I can tell that's how it's supposed to work. However, it's like my hosts don't even get past the distribution match, wherever that happens in the code...they get dumped straight into the UnimplementedStrategy class for error handling. If the code were recognizing CentOS, it would be using

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Greg Swift
Hrm.. Hadnt seen her recreation on nonaws email. Now I'm stumped again. Hostnamectl is provided directly by systemd. On Fri, Nov 13, 2015, 13:08 Greg Swift wrote: > Joanna found that it has something to do with the AWS CentOS7 install. I'm > assuming based on her PR that it doesnt seem to have

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Greg Swift
Joanna found that it has something to do with the AWS CentOS7 install. I'm assuming based on her PR that it doesnt seem to have hostnamectl available, which seems weird? https :// github.c

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Brian Coca
the module checks the platform and version to determine which approach it uses, for centos if the version is >= 7 it will use systemd, for other versions it uses hostname + file editing. -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Proje

Re: [ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Ivan S. Freitas
I would bet the module is trying to set the hostname using the features of the old Centos' init system, then fails since it has transitioned to systemd. Can you set the hostname manually with a 'command' action calling hostnamectl? You could also try the modules from the 2.0-rc releases or git to s

[ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
I updated to Ansible 1.9.4, and I still have the same issue on both target hosts. On Wednesday, November 11, 2015 at 2:44:02 PM UTC-6, Joanna Delaporte wrote: > > Hello everyone, > > I am getting the following error while attempting to run a Galaxy role > that was published for EL 7. My target h

[ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
Okay, I just repeated the error on a recently-built CentOS 7.0.1406 machine that is on my physical network, not an AWS machine. "ansible_distribution": "CentOS", "ansible_distribution_major_version": "7", "ansible_distribution_release": "Core", "ansible_distribution_v

[ansible-project] Re: msg: hostname module cannot be used on platform Linux (Centos linux)

2015-11-13 Thread Joanna Delaporte
Your role is awesome. Thanks for writing it...I ran into another issue with firewalld not being installed by default on AWS. I submitted a pull request this morning to include installing and starting firewalld. The shell command hostname seemed to worked fine, but in my research about it, sup