Re: ansible in Fedora 23+ (python3)

2015-11-20 Thread Kevin Fenzi
On Fri, 20 Nov 2015 09:32:59 +0100
Petr Spacek  wrote:

> I would say nothing... Following playbook snippet is just enough to
> go from bare minimal Fedora 23 to Fedora 23 which can run Ansible
> modules:
> 
> - hosts: vm_templates
>   gather_facts: False
>   tasks:
>   - name: install packages for ansible support
> raw: dnf -y install python python2-dnf

Sure, but it's not idempotent.

Having a group available at the install step I think is still handy,
because if you know you are going to be using ansible you can just add
that group from the list of groups on the dvd.
 
> Maybe we can get a patch to ansible which prints a useful hint when
> Python 2 interpreter is not found on the target system?
> 
> I mean something like:
> "Huh, there is no Python 2 on the system .
> Please use gather_facts: False & raw module to install Python 2
> package."
> 
> It would help even to users who do not use kickstarts, e.g. when you
> download a image from somewhere and it does not work with Ansible by
> default.

Sure, sounds like a nice RFE upstream. :) 

kevin 



pgpcVCCr472OD.pgp
Description: OpenPGP digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-11-20 Thread Adam Williamson
On Thu, 2015-11-19 at 17:28 -0500, Bill Nottingham wrote:
> Till Maas (opensou...@till.name) said: 
> > On Wed, Nov 18, 2015 at 04:00:41PM -0800, Adam Williamson wrote:
> > 
> > > OK - so what's the clear and non-controversial definition of
> > > "modules
> > > like 'file', 'template' and 'copy'"? What do those modules share
> > > in
> > > common that we can define clearly and concisely and in a way
> > > there
> > > won't be any serious dispute over?
> > 
> > Maybe "packages needed to be able to to use and configure the
> > default
> > package manager". For example one might need to be able to adjust
> > the
> > dnf repo config to be able to actually install pkgs, if there is a
> > restrictive firewall for example and only local mirrors are
> > accessible
> > or a proxy has to be used.
> 
> I would say "packages needed to be able to install software and then
> do
> basic configuration of the system" - this would be:
> 
> - $package_manager
> - core modules from http://docs.ansible.com/ansible/list_of_system_mo
> dules.html
> - core modules from http://docs.ansible.com/ansible/list_of_files_mod
> ules.html

That seems viable, sure. +1. Would you like to add a comment in comps
and update the group with the appropriate packages, or shall I? Thanks!
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-11-20 Thread Petr Spacek
On 19.11.2015 23:28, Bill Nottingham wrote:
> Till Maas (opensou...@till.name) said: 
>> On Wed, Nov 18, 2015 at 04:00:41PM -0800, Adam Williamson wrote:
>>
>>> OK - so what's the clear and non-controversial definition of "modules
>>> like 'file', 'template' and 'copy'"? What do those modules share in
>>> common that we can define clearly and concisely and in a way there
>>> won't be any serious dispute over?
>>
>> Maybe "packages needed to be able to to use and configure the default
>> package manager". For example one might need to be able to adjust the
>> dnf repo config to be able to actually install pkgs, if there is a
>> restrictive firewall for example and only local mirrors are accessible
>> or a proxy has to be used.
> 
> I would say "packages needed to be able to install software and then do
> basic configuration of the system" - this would be:
> 
> - $package_manager
> - core modules from 
> http://docs.ansible.com/ansible/list_of_system_modules.html
> - core modules from http://docs.ansible.com/ansible/list_of_files_modules.html

I would say nothing... Following playbook snippet is just enough to go from
bare minimal Fedora 23 to Fedora 23 which can run Ansible modules:

- hosts: vm_templates
  gather_facts: False
  tasks:
  - name: install packages for ansible support
raw: dnf -y install python python2-dnf

Maybe we can get a patch to ansible which prints a useful hint when Python 2
interpreter is not found on the target system?

I mean something like:
"Huh, there is no Python 2 on the system .
Please use gather_facts: False & raw module to install Python 2 package."

It would help even to users who do not use kickstarts, e.g. when you download
a image from somewhere and it does not work with Ansible by default.

-- 
Petr Spacek  @  Red Hat
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-11-19 Thread Till Maas
On Wed, Nov 18, 2015 at 04:00:41PM -0800, Adam Williamson wrote:

> OK - so what's the clear and non-controversial definition of "modules
> like 'file', 'template' and 'copy'"? What do those modules share in
> common that we can define clearly and concisely and in a way there
> won't be any serious dispute over?

Maybe "packages needed to be able to to use and configure the default
package manager". For example one might need to be able to adjust the
dnf repo config to be able to actually install pkgs, if there is a
restrictive firewall for example and only local mirrors are accessible
or a proxy has to be used.

Regards
Till
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-11-19 Thread Bill Nottingham
Till Maas (opensou...@till.name) said: 
> On Wed, Nov 18, 2015 at 04:00:41PM -0800, Adam Williamson wrote:
> 
> > OK - so what's the clear and non-controversial definition of "modules
> > like 'file', 'template' and 'copy'"? What do those modules share in
> > common that we can define clearly and concisely and in a way there
> > won't be any serious dispute over?
> 
> Maybe "packages needed to be able to to use and configure the default
> package manager". For example one might need to be able to adjust the
> dnf repo config to be able to actually install pkgs, if there is a
> restrictive firewall for example and only local mirrors are accessible
> or a proxy has to be used.

I would say "packages needed to be able to install software and then do
basic configuration of the system" - this would be:

- $package_manager
- core modules from http://docs.ansible.com/ansible/list_of_system_modules.html
- core modules from http://docs.ansible.com/ansible/list_of_files_modules.html

Bill
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-11-19 Thread Stephen Gallagher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11/18/2015 07:00 PM, Adam Williamson wrote:
> On Wed, 2015-11-18 at 17:19 -0500, Bill Nottingham wrote:
>> Adam Williamson (adamw...@fedoraproject.org) said:
 You really really want libselinux-python(2) for that as well
 - it's needed for any file/copy/templating you'd do on the
 node to ensure proper SELinux contexts. (In fact, Ansible
 will abort on the node without it if it detects SELinux in
 use, as it doesn't want to misconfigure the node.)
>>> 
>>> Well, I explicitly addressed that above: I think as soon as you
>>> get into adding packages that are needed for some particular
>>> module, you're on a slippery slope which winds up with
>>> including docker...how do we decide which modules are
>>> 'essential' and which aren't?
>> 
>> I think that the slipperly slope argument is taking the easy way
>> out here. Ensuring that modules like 'file', 'template', and
>> 'copy' work is not the same as including docker in the minimal
>> image.
> 
> OK - so what's the clear and non-controversial definition of
> "modules like 'file', 'template' and 'copy'"? What do those modules
> share in common that we can define clearly and concisely and in a
> way there won't be any serious dispute over?
> 

I was going to suggest "whatever is needed to support
ansible-modules-core", but looking at the code for
ansible-modules-core, it covers a LOT of stuff (including
source-control tools).

So... I dunno.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iEYEARECAAYFAlZNxqIACgkQeiVVYja6o6ObcgCfQp6tm9brOHvAjCBFkL4sIltT
baQAn0YzBBhj71mgQFh0ta2bCUioKzfN
=6qRU
-END PGP SIGNATURE-
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-11-18 Thread Bill Nottingham
Adam Williamson (adamw...@fedoraproject.org) said: 
> On Tue, 2015-10-13 at 22:21 -0400, Dusty Mabe wrote:
> > 
> > Does anyone have a good solution for this? Obviously it would be nice
> > if ansible went to python3 but I think they have stated clearly that
> > they are sticking with python2 for backwards compat with systems that
> > still need 2.4.
> 
> FWIW, as this came up in the Server WG meeting this morning, we decided
> to Do Something About It:
> 
> https://git.fedorahosted.org/cgit/comps.git/commit/?id=4b9858ce8cabdec83bb78ab5f7af4c704278bdc2
> https://git.fedorahosted.org/cgit/spin-kickstarts.git/commit/?id=1d9ef5a9c1e148b979c68a1b510f6b007e652d93
> 
> I added a new package group - 'ansible-node' - which you can select to
> ensure the system can be managed via ansible. I decided that the
> definition of 'can be managed' is simply 'enough bits present that you
> can install any additional bits you need in the obvious way' - so for
> now the group simply includes 'python2-dnf'. But it means we have a
> 'result-based' mechanism for this so we can handle similar situations
> in future through this package group, and it makes it visible in the
> installer for interactive installs.
> 
> We *could* add a bunch of 'default' and/or 'optional' packages to the
> group for commonly-needed stuff like the selinux support packages
> needed for file operations, but I think for now I'd prefer to keep it
> simple and only include packages necessary for the 'dnf' module to
> work.

You really really want libselinux-python(2) for that as well - it's needed
for any file/copy/templating you'd do on the node to ensure proper SELinux
contexts. (In fact, Ansible will abort on the node without it if it detects
SELinux in use, as it doesn't want to misconfigure the node.)

Bill
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-11-18 Thread Adam Williamson
On Wed, 2015-11-18 at 14:36 -0500, Bill Nottingham wrote:
> Adam Williamson (adamw...@fedoraproject.org) said: 
> > On Tue, 2015-10-13 at 22:21 -0400, Dusty Mabe wrote:
> > > 
> > > Does anyone have a good solution for this? Obviously it would be nice
> > > if ansible went to python3 but I think they have stated clearly that
> > > they are sticking with python2 for backwards compat with systems that
> > > still need 2.4.
> > 
> > FWIW, as this came up in the Server WG meeting this morning, we decided
> > to Do Something About It:
> > 
> > https://git.fedorahosted.org/cgit/comps.git/commit/?id=4b9858ce8cabdec83bb78ab5f7af4c704278bdc2
> > https://git.fedorahosted.org/cgit/spin-kickstarts.git/commit/?id=1d9ef5a9c1e148b979c68a1b510f6b007e652d93
> > 
> > I added a new package group - 'ansible-node' - which you can select to
> > ensure the system can be managed via ansible. I decided that the
> > definition of 'can be managed' is simply 'enough bits present that you
> > can install any additional bits you need in the obvious way' - so for
> > now the group simply includes 'python2-dnf'. But it means we have a
> > 'result-based' mechanism for this so we can handle similar situations
> > in future through this package group, and it makes it visible in the
> > installer for interactive installs.
> > 
> > We *could* add a bunch of 'default' and/or 'optional' packages to the
> > group for commonly-needed stuff like the selinux support packages
> > needed for file operations, but I think for now I'd prefer to keep it
> > simple and only include packages necessary for the 'dnf' module to
> > work.
> 
> You really really want libselinux-python(2) for that as well - it's needed
> for any file/copy/templating you'd do on the node to ensure proper SELinux
> contexts. (In fact, Ansible will abort on the node without it if it detects
> SELinux in use, as it doesn't want to misconfigure the node.)

Well, I explicitly addressed that above: I think as soon as you get
into adding packages that are needed for some particular module, you're
on a slippery slope which winds up with including docker...how do we
decide which modules are 'essential' and which aren't?

I quite like making the rule 'whatever packages are needed so you can
install further packages with the module for the official package
manager without any hacks', as that's pretty clear and non-
controversial, I think. You can add other necessary packages as part of
the play(book) or in a kickstart, whichever convention works for you.
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-11-18 Thread Stephen Gallagher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11/18/2015 03:21 PM, Adam Williamson wrote:
> On Wed, 2015-11-18 at 14:36 -0500, Bill Nottingham wrote:
>> Adam Williamson (adamw...@fedoraproject.org) said:
>>> On Tue, 2015-10-13 at 22:21 -0400, Dusty Mabe wrote:
 
 Does anyone have a good solution for this? Obviously it would
 be nice if ansible went to python3 but I think they have
 stated clearly that they are sticking with python2 for
 backwards compat with systems that still need 2.4.
>>> 
>>> FWIW, as this came up in the Server WG meeting this morning, we
>>> decided to Do Something About It:
>>> 
>>> https://git.fedorahosted.org/cgit/comps.git/commit/?id=4b9858ce8cabdec83bb78ab5f7af4c704278bdc2
>>>
>>> 
https://git.fedorahosted.org/cgit/spin-kickstarts.git/commit/?id=1d9ef5a9c1e148b979c68a1b510f6b007e652d93
>>> 
>>> I added a new package group - 'ansible-node' - which you can
>>> select to ensure the system can be managed via ansible. I
>>> decided that the definition of 'can be managed' is simply
>>> 'enough bits present that you can install any additional bits
>>> you need in the obvious way' - so for now the group simply
>>> includes 'python2-dnf'. But it means we have a 'result-based'
>>> mechanism for this so we can handle similar situations in
>>> future through this package group, and it makes it visible in
>>> the installer for interactive installs.
>>> 
>>> We *could* add a bunch of 'default' and/or 'optional' packages
>>> to the group for commonly-needed stuff like the selinux support
>>> packages needed for file operations, but I think for now I'd
>>> prefer to keep it simple and only include packages necessary
>>> for the 'dnf' module to work.
>> 
>> You really really want libselinux-python(2) for that as well -
>> it's needed for any file/copy/templating you'd do on the node to
>> ensure proper SELinux contexts. (In fact, Ansible will abort on
>> the node without it if it detects SELinux in use, as it doesn't
>> want to misconfigure the node.)
> 
> Well, I explicitly addressed that above: I think as soon as you
> get into adding packages that are needed for some particular
> module, you're on a slippery slope which winds up with including
> docker...how do we decide which modules are 'essential' and which
> aren't?
> 
> I quite like making the rule 'whatever packages are needed so you
> can install further packages with the module for the official
> package manager without any hacks', as that's pretty clear and
> non- controversial, I think. You can add other necessary packages
> as part of the play(book) or in a kickstart, whichever convention
> works for you.
> 

I think the clarification we need is this: is libselinux-python needed
so that ansible can use python-dnf? If so (and there's a good reason
why it's not a direct dependency of python-dnf), then we will need to
include it *for that purpose*.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iEYEARECAAYFAlZM4CAACgkQeiVVYja6o6M9eACeI12Wk3jD0A5+c2v4x13ql4jH
Z4IAn1RvDTy4rYGQzEvkXMKQkJX/m5W3
=2Ijp
-END PGP SIGNATURE-
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-11-18 Thread Bill Nottingham
Adam Williamson (adamw...@fedoraproject.org) said: 
> > You really really want libselinux-python(2) for that as well - it's needed
> > for any file/copy/templating you'd do on the node to ensure proper SELinux
> > contexts. (In fact, Ansible will abort on the node without it if it detects
> > SELinux in use, as it doesn't want to misconfigure the node.)
> 
> Well, I explicitly addressed that above: I think as soon as you get
> into adding packages that are needed for some particular module, you're
> on a slippery slope which winds up with including docker...how do we
> decide which modules are 'essential' and which aren't?

I think that the slipperly slope argument is taking the easy way out here. 
Ensuring
that modules like 'file', 'template', and 'copy' work is not the same as 
including
docker in the minimal image.

Bill
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-11-18 Thread Adam Williamson
On Wed, 2015-11-18 at 17:19 -0500, Bill Nottingham wrote:
> Adam Williamson (adamw...@fedoraproject.org) said: 
> > > You really really want libselinux-python(2) for that as well - it's needed
> > > for any file/copy/templating you'd do on the node to ensure proper SELinux
> > > contexts. (In fact, Ansible will abort on the node without it if it 
> > > detects
> > > SELinux in use, as it doesn't want to misconfigure the node.)
> > 
> > Well, I explicitly addressed that above: I think as soon as you get
> > into adding packages that are needed for some particular module, you're
> > on a slippery slope which winds up with including docker...how do we
> > decide which modules are 'essential' and which aren't?
> 
> I think that the slipperly slope argument is taking the easy way out here. 
> Ensuring
> that modules like 'file', 'template', and 'copy' work is not the same as 
> including
> docker in the minimal image.

OK - so what's the clear and non-controversial definition of "modules
like 'file', 'template' and 'copy'"? What do those modules share in
common that we can define clearly and concisely and in a way there
won't be any serious dispute over?
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-11-17 Thread Adam Williamson
On Tue, 2015-10-13 at 22:21 -0400, Dusty Mabe wrote:
> 
> Does anyone have a good solution for this? Obviously it would be nice
> if ansible went to python3 but I think they have stated clearly that
> they are sticking with python2 for backwards compat with systems that
> still need 2.4.

FWIW, as this came up in the Server WG meeting this morning, we decided
to Do Something About It:

https://git.fedorahosted.org/cgit/comps.git/commit/?id=4b9858ce8cabdec83bb78ab5f7af4c704278bdc2
https://git.fedorahosted.org/cgit/spin-kickstarts.git/commit/?id=1d9ef5a9c1e148b979c68a1b510f6b007e652d93

I added a new package group - 'ansible-node' - which you can select to
ensure the system can be managed via ansible. I decided that the
definition of 'can be managed' is simply 'enough bits present that you
can install any additional bits you need in the obvious way' - so for
now the group simply includes 'python2-dnf'. But it means we have a
'result-based' mechanism for this so we can handle similar situations
in future through this package group, and it makes it visible in the
installer for interactive installs.

We *could* add a bunch of 'default' and/or 'optional' packages to the
group for commonly-needed stuff like the selinux support packages
needed for file operations, but I think for now I'd prefer to keep it
simple and only include packages necessary for the 'dnf' module to
work.
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-20 Thread Bill Nottingham
Kevin Kofler (kevin.kof...@chello.at) said: 
> Fabio Alessandro Locati wrote:
> > Also, the problem is that RedHat still supports RHEL5 systems which
> > for today standards are totally legacy and therefore it has to run on
> > Python 2.4.
> 
> The point of forking would be that the fork wouldn't have to care. Let the 
> upstream project deal with ancient legacy systems, the rest of the world can 
> and should move on.

I don't know how to say this other than your concept of what the "rest of
the world" wants being different from what the current upstream project works on
is entirely wrong.

Bill
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-20 Thread Stephen John Smoogen
On 19 October 2015 at 21:00, Kevin Kofler  wrote:
> Fabio Alessandro Locati wrote:
>> Also, the problem is that RedHat still supports RHEL5 systems which
>> for today standards are totally legacy and therefore it has to run on
>> Python 2.4.
>
> The point of forking would be that the fork wouldn't have to care. Let the
> upstream project deal with ancient legacy systems, the rest of the world can
> and should move on.
>

Then fork it, find the people that want it and be done with us laggards here.




-- 
Stephen J Smoogen.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-19 Thread Richard Bradfield

On Mon, 19 Oct 2015, at 01:33, Kevin Kofler wrote:
> Dusty Mabe wrote:
> > Does anyone have a good solution for this? Obviously it would be nice
> > if ansible went to python3 but I think they have stated clearly that
> > they are sticking with python2 for backwards compat with systems that
> > still need 2.4.
> 
> I don't understand why still nobody has forked Ansible to get it out of
> the 
> stone age.
> 
> Kevin Kofler
> 

A solution where everybody wins could be shifting the requirement from
2.4 to 2.7 as of a given release point.

Older machines (I believe RHEL 5.something is the oldest target) can
have Python 2.7 installed, and nobody should be building out new servers
with RHEL 5 on them anymore. Possibly a discussion the Ansible mailing
list have had many many times before though, maybe we'll see a different
attitude under Red Hat's leadership.

---
Richard Bradfield
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-19 Thread Fabio Alessandro Locati
2015-10-19 2:33 GMT+02:00 Kevin Kofler :
> Dusty Mabe wrote:
>> Does anyone have a good solution for this? Obviously it would be nice
>> if ansible went to python3 but I think they have stated clearly that
>> they are sticking with python2 for backwards compat with systems that
>> still need 2.4.
>
> I don't understand why still nobody has forked Ansible to get it out of the
> stone age.

It's not so easy. Ansible is based on Twisted which is not yet 100%
Python3 compatible, as far as I understood.
Also, the problem is that RedHat still supports RHEL5 systems which
for today standards are totally legacy and therefore it has to run on
Python 2.4.

-- 
Fabio Alessandro Locati

PGP Fingerprint: B960 BE9D E7A8 FA12 273A  98BB 6D6A 29D6 709A 7851
https://keybase.io/fale
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-19 Thread Florian Weimer
On 10/19/2015 11:37 AM, Fabio Alessandro Locati wrote:
> 2015-10-19 2:33 GMT+02:00 Kevin Kofler :
>> Dusty Mabe wrote:
>>> Does anyone have a good solution for this? Obviously it would be nice
>>> if ansible went to python3 but I think they have stated clearly that
>>> they are sticking with python2 for backwards compat with systems that
>>> still need 2.4.
>>
>> I don't understand why still nobody has forked Ansible to get it out of the
>> stone age.
> 
> It's not so easy. Ansible is based on Twisted which is not yet 100%
> Python3 compatible, as far as I understood.

Does the code which is injected into managed machines use Twisted?  That
would be a bit odd.

I think there are two different levels of Python 3 support, one for the
managing host (desirable but not essential), and one for the managed
hosts (increasingly important if there are systems which only have
Python 3 and cannot install Python 2).

Florian

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-19 Thread Adam Miller
On Mon, Oct 19, 2015 at 4:37 AM, Fabio Alessandro Locati
 wrote:
> 2015-10-19 2:33 GMT+02:00 Kevin Kofler :
>> Dusty Mabe wrote:
>>> Does anyone have a good solution for this? Obviously it would be nice
>>> if ansible went to python3 but I think they have stated clearly that
>>> they are sticking with python2 for backwards compat with systems that
>>> still need 2.4.
>>
>> I don't understand why still nobody has forked Ansible to get it out of the
>> stone age.
>
> It's not so easy. Ansible is based on Twisted which is not yet 100%
> Python3 compatible, as far as I understood.
> Also, the problem is that RedHat still supports RHEL5 systems which
> for today standards are totally legacy and therefore it has to run on
> Python 2.4.

What makes you think it's based on twisted? I just did a 'git grep
twisted' on the ansible code base and got zero hits.

-AdamM

>
> --
> Fabio Alessandro Locati
>
> PGP Fingerprint: B960 BE9D E7A8 FA12 273A  98BB 6D6A 29D6 709A 7851
> https://keybase.io/fale
> --
> devel mailing list
> devel@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/devel
> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-19 Thread Kevin Kofler
Fabio Alessandro Locati wrote:
> Also, the problem is that RedHat still supports RHEL5 systems which
> for today standards are totally legacy and therefore it has to run on
> Python 2.4.

The point of forking would be that the fork wouldn't have to care. Let the 
upstream project deal with ancient legacy systems, the rest of the world can 
and should move on.

Kevin Kofler

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-18 Thread Kevin Kofler
Dusty Mabe wrote:
> Does anyone have a good solution for this? Obviously it would be nice
> if ansible went to python3 but I think they have stated clearly that
> they are sticking with python2 for backwards compat with systems that
> still need 2.4.

I don't understand why still nobody has forked Ansible to get it out of the 
stone age.

Kevin Kofler

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-15 Thread Robert Kuska


- Original Message -
> From: "Kevin Fenzi" <ke...@scrye.com>
> To: devel@lists.fedoraproject.org
> Sent: Wednesday, October 14, 2015 9:04:19 PM
> Subject: Re: ansible in Fedora 23+ (python3)
> 
> On Wed, 14 Oct 2015 16:47:56 +
> Igor Gnatenko <i.gnatenko.br...@gmail.com> wrote:
> 
> > Yes, DNF module works for ansible from the box. We worked at it for
> > some time: https://github.com/ansible/ansible-modules-extras/pull/527
> 
> ...with the caveat from the first post in this thread: You will need to
> have the python2 dnf bindings installed for it to work.
> 
> kevin

It seems to be python3 ready, isn't just changing shebang to /usr/bin/python3
sufficient?

--
Robert Kuska
{rkuska}
> 
> --
> devel mailing list
> devel@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/devel
> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-15 Thread Bill Nottingham
Robert Kuska (rku...@redhat.com) said: 
> > > Yes, DNF module works for ansible from the box. We worked at it for
> > > some time: https://github.com/ansible/ansible-modules-extras/pull/527
> > 
> > ...with the caveat from the first post in this thread: You will need to
> > have the python2 dnf bindings installed for it to work.
> > 
> > kevin
> 
> It seems to be python3 ready, isn't just changing shebang to /usr/bin/python3
> sufficient?

Not sure if you're referring to dnf, the dnf python bindings, or Ansible
here, but just to give background:

Ansible works by connecting to other machines and sending across small bits
of python to execute.  In Ansible parlance, these are called 'modules'.  What
this means is that the version of python that you're using on the control
machine needs to reasonably match the version of python on machines you're
controlling, and that all bindings you use in your modules need to be of the
same python version as the Ansible version you're using.  If Ansible were to
use python3, all module bindings would need to be python 3, and *all the
managed machines would need to have python3 installed*.

This is why as of now Ansible will always be somewhat 'trailing' in terms of
its python support - it needs to continue to work in a way congruent with
the overwhelming majority of the machines that Ansible is currently being
used to manage.  That means python 2, and that all the bindings used for
package managers (yum, dnf), bindings for modules that need to set file
attributes (libselinux), or even for talking to cloud things (shade, boto)
need to be python2.

It's great that Fedora is moving to python 3, and we're happy to to work
with the Fedora teams with their use of Ansible, but the percentage of
people using Ansible to manage Fedora (and other python3-using-distros)
doesn't justify moving Ansible to python3 at this time.

Bill
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-15 Thread Lars Kellogg-Stedman
On Thu, Oct 15, 2015 at 11:54:29AM -0400, Bill Nottingham wrote:
> same python version as the Ansible version you're using.  If Ansible were to
> use python3, all module bindings would need to be python 3, and *all the
> managed machines would need to have python3 installed*.

Isn't it entirely possible -- through liberal use of 'six' and 'from
future...' -- to write code that will operate correctly with both
Python 2 and Python 3?  I thought that, e.g., OpenStack was pursuing
exactly that strategy.

Sure, you still need your target Python 3 environment to have the
appropriate supporting modules, but that seems like a different issue.
Environments runnning Python 2 should continue to Just Work.

-- 
Lars Kellogg-Stedman  | larsks @ {freenode,twitter,github}
Cloud Engineering / OpenStack  | http://blog.oddbit.com/



signature.asc
Description: PGP signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-15 Thread Ryan S. Brown

On 10/15/2015 03:30 PM, Lars Kellogg-Stedman wrote:

On Thu, Oct 15, 2015 at 11:54:29AM -0400, Bill Nottingham wrote:

same python version as the Ansible version you're using.  If Ansible were to
use python3, all module bindings would need to be python 3, and *all the
managed machines would need to have python3 installed*.


Isn't it entirely possible -- through liberal use of 'six' and 'from
future...' -- to write code that will operate correctly with both
Python 2 and Python 3?  I thought that, e.g., OpenStack was pursuing
exactly that strategy.

Sure, you still need your target Python 3 environment to have the
appropriate supporting modules, but that seems like a different issue.
Environments runnning Python 2 should continue to Just Work.


[not an ansible dev, but I am an OpenStack contributor]

The difference here is the span of versions that need to be supported. 
OpenStack is only trying to support 2.7-3.X and the gulf between 2.4 and 
2.7 is actually quite broad. It is likely possible, but it will be a 
very large amount of work and would add dependencies to both runtimes.



Because "no setup" is such a huge part of what makes ansible attractive, 
I doubt adding that dependency would be viable.


--
Ryan Brown / Senior Software Engineer, OpenStack / Red Hat, Inc.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-15 Thread Lars Kellogg-Stedman
On Thu, Oct 15, 2015 at 03:36:28PM -0400, Ryan S. Brown wrote:
> The difference here is the span of versions that need to be supported.
> OpenStack is only trying to support 2.7-3.X and the gulf between 2.4 and 2.7
> is actually quite broad.

True that, and I didn't bother to check what Ansible target was for
supported Python versions. Bad Lars.

-- 
Lars Kellogg-Stedman  | larsks @ {freenode,twitter,github}
Cloud Engineering / OpenStack  | http://blog.oddbit.com/



signature.asc
Description: PGP signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Matthew Miller
On Wed, Oct 14, 2015 at 08:40:19AM -0500, Pete Travis wrote:
> >> Beyond that, though, why not just have your ansible play ensure its own
> >> deps are installed? If you're dealing with docker, make sure the
> >> package you need is installed before you run any docker steps...
> > So, in other words, it seems acceptible to make this a documentation
> > problem? We should at least definitely make sure to have that
> > documentation.
> I haven't poked at this yet, but can add it to the release notes.  Can
> someone confirm that at least the dnf module works out of the box?

Cool. This seems like it'd also be a nice one for Future Awesome Short
Documentation Site. :) In the meantime, maybe it could be a Fedora
Magazine article (or part of a series?)

-- 
Matthew Miller

Fedora Project Leader
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Colin Walters
On Tue, Oct 13, 2015, at 10:21 PM, Dusty Mabe wrote:

> Just wondering if anyone has started to feel any pain from trying to
> use ansible with F23 systems. As part of the Fedora Cloud working
> group it would be nice to ship a system that could be targeted by
> ansible out of the box. 

Sounds like you're talking about the Cloud Base; this is not
an issue for the Atomic Host; see:

https://lists.fedoraproject.org/pipermail/devel/2015-June/211310.html
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Adam Williamson
On Wed, 2015-10-14 at 08:47 -0400, Matthew Miller wrote:
> On Tue, Oct 13, 2015 at 08:57:57PM -0700, Adam Williamson wrote:
> > Beyond that, though, why not just have your ansible play ensure its
> > own
> > deps are installed? If you're dealing with docker, make sure the
> > package you need is installed before you run any docker steps...
> 
> So, in other words, it seems acceptible to make this a documentation
> problem? We should at least definitely make sure to have that
> documentation.

Eh, I guess for me the general 'case' here isn't even really something
for Fedora to document, it's just...how ansible works? It can remote
all sorts of stuff, I mean, *obviously* you need to install the
appropriate backing bits. If anything it seems like something for
upstream Ansible docs, but I'd not be at all surprised if it's already
in there.

The fact that you can't install any packages with ansible on at least
some OOTB F23 installs is unfortunate, though, and probably worth a
mention in the relnotes or common bugs. The reason is simply that DNF
went to Python 3 by default, but ansible still needs python2-dnf . Or
yum, but that's not there by default either. I know at least minimal
installs don't include python2-dnf, not sure if any larger package sets
do happen to pull it in.
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Dusty Mabe
On Wed, Oct 14, 2015 at 11:07:42AM -0400, Colin Walters wrote:
> On Tue, Oct 13, 2015, at 10:21 PM, Dusty Mabe wrote:
> 
> > Just wondering if anyone has started to feel any pain from trying to
> > use ansible with F23 systems. As part of the Fedora Cloud working
> > group it would be nice to ship a system that could be targeted by
> > ansible out of the box. 
> 
> Sounds like you're talking about the Cloud Base; this is not
> an issue for the Atomic Host; see:
> 
> https://lists.fedoraproject.org/pipermail/devel/2015-June/211310.html

I am talking about cloud base, but don't be so fast to assume Atomic
is OK because it has python2. Arguably Atomic is in a worse position.

Part of this email chain is to explain how just installing python2 
isn't going to solve the problem..

For example, if I simply want to place a file on the host:
  tasks:


- name: write .bashrc
  template: src=/home/dustymabe/.bashrc dest=/root/.bashrc
I end up with:
msg: Aborting, target uses selinux but python bindings (libselinux-python) 
aren't installed!


Another example: I want to start a docker container:
  tasks:


- name: start skydns
  docker:
name:  skydns
net:   host 
image: gcr.io/google_containers/skydns:2015-03-11-001
docker_api_version: 1.18 # Not sure why this is needed
state: started
restart_policy: always
env:
ETCD_MACHINES:  "http://127.0.0.1:2379;
SKYDNS_DOMAIN:  "kubernetes.local"
SKYDNS_ADDR:"0.0.0.0:53"
SKYDNS_NAMESERVERS: "8.8.8.8:53,8.8.4.4:53"

I end up with:
msg: `docker-py` doesn't seem to be installed, but is required for the 
Ansible Docker module.

Even though the python3 versions of those libraries are in the system 
it doesn't work. For atomic there is no way to workaround this either.


Dusty
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Matthew Miller
On Wed, Oct 14, 2015 at 08:47:24AM -0700, Adam Williamson wrote:
> Eh, I guess for me the general 'case' here isn't even really something
> for Fedora to document, it's just...how ansible works? It can remote
> all sorts of stuff, I mean, *obviously* you need to install the
> appropriate backing bits. If anything it seems like something for
> upstream Ansible docs, but I'd not be at all surprised if it's already
> in there.

I don't think it's something we *need* to document, but it's the kind
of thing where if we *do* have documentation for it, our users (and
potential users) are better off.


-- 
Matthew Miller

Fedora Project Leader
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Igor Gnatenko
Yes, DNF module works for ansible from the box. We worked at it for some
time: https://github.com/ansible/ansible-modules-extras/pull/527

On Wed, Oct 14, 2015 at 4:28 PM Matthew Miller 
wrote:

> On Wed, Oct 14, 2015 at 08:40:19AM -0500, Pete Travis wrote:
> > >> Beyond that, though, why not just have your ansible play ensure its
> own
> > >> deps are installed? If you're dealing with docker, make sure the
> > >> package you need is installed before you run any docker steps...
> > > So, in other words, it seems acceptible to make this a documentation
> > > problem? We should at least definitely make sure to have that
> > > documentation.
> > I haven't poked at this yet, but can add it to the release notes.  Can
> > someone confirm that at least the dnf module works out of the box?
>
> Cool. This seems like it'd also be a nice one for Future Awesome Short
> Documentation Site. :) In the meantime, maybe it could be a Fedora
> Magazine article (or part of a series?)
>
> --
> Matthew Miller
> 
> Fedora Project Leader
> --
> devel mailing list
> devel@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/devel
> Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

-- 

-Igor Gnatenko
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Miroslav Suchý
Dne 14.10.2015 v 04:21 Dusty Mabe napsal(a):
> Obviously it would be nice
> if ansible went to python3 but I think they have stated clearly that
> they are sticking with python2 for backwards compat with systems that
> still need 2.4.

*nod*
https://github.com/ansible/ansible/issues/1409

-- 
Miroslav Suchy, RHCA
Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Kevin Fenzi
On Wed, 14 Oct 2015 16:47:56 +
Igor Gnatenko  wrote:

> Yes, DNF module works for ansible from the box. We worked at it for
> some time: https://github.com/ansible/ansible-modules-extras/pull/527

...with the caveat from the first post in this thread: You will need to
have the python2 dnf bindings installed for it to work. 

kevin


pgpoYh4SCbPj6.pgp
Description: OpenPGP digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Matthew Miller
On Tue, Oct 13, 2015 at 08:57:57PM -0700, Adam Williamson wrote:
> Beyond that, though, why not just have your ansible play ensure its own
> deps are installed? If you're dealing with docker, make sure the
> package you need is installed before you run any docker steps...

So, in other words, it seems acceptible to make this a documentation
problem? We should at least definitely make sure to have that
documentation.

-- 
Matthew Miller

Fedora Project Leader
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Pete Travis


On 10/14/2015 07:47 AM, Matthew Miller wrote:
> On Tue, Oct 13, 2015 at 08:57:57PM -0700, Adam Williamson wrote:
>> Beyond that, though, why not just have your ansible play ensure its own
>> deps are installed? If you're dealing with docker, make sure the
>> package you need is installed before you run any docker steps...
> So, in other words, it seems acceptible to make this a documentation
> problem? We should at least definitely make sure to have that
> documentation.
>

I haven't poked at this yet, but can add it to the release notes.  Can
someone confirm that at least the dnf module works out of the box?

-- Pete
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Matthew Miller
On Wed, Oct 14, 2015 at 11:07:42AM -0400, Colin Walters wrote:
> > Just wondering if anyone has started to feel any pain from trying to
> > use ansible with F23 systems. As part of the Fedora Cloud working
> > group it would be nice to ship a system that could be targeted by
> > ansible out of the box. 
> 
> Sounds like you're talking about the Cloud Base; this is not
> an issue for the Atomic Host; see:
> 
> https://lists.fedoraproject.org/pipermail/devel/2015-June/211310.html

If we assume many or most Atomic Host users will be using Ansible, I
think that's a good batteries-included call. Interestingly, CoreOS has
_no_ version of Python, and I've seen two approaches for dealing with
this: using ansible 'raw' mode to pull down a python interpreter into
/home/core/bin, or else to use the toolbox-container — which,
awesomely, is Fedora-based and contains Python.

-- 
Matthew Miller

Fedora Project Leader
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Dusty Mabe



On 10/14/2015 12:42 PM, Matthew Miller wrote:

On Wed, Oct 14, 2015 at 11:07:42AM -0400, Colin Walters wrote:

Just wondering if anyone has started to feel any pain from trying to
use ansible with F23 systems. As part of the Fedora Cloud working
group it would be nice to ship a system that could be targeted by
ansible out of the box.

Sounds like you're talking about the Cloud Base; this is not
an issue for the Atomic Host; see:

https://lists.fedoraproject.org/pipermail/devel/2015-June/211310.html

If we assume many or most Atomic Host users will be using Ansible, I
think that's a good batteries-included call. Interestingly, CoreOS has
_no_ version of Python, and I've seen two approaches for dealing with
this: using ansible 'raw' mode to pull down a python interpreter into
/home/core/bin, or else to use the toolbox-container — which,
awesomely, is Fedora-based and contains Python.



Cool. I didn't know about 'raw' mode. That could provide us with some 
workarounds that we could document.


The toolbox container might be something we could use on Atomic.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-14 Thread Dusty Mabe



On 10/14/2015 09:40 AM, Pete Travis wrote:


On 10/14/2015 07:47 AM, Matthew Miller wrote:

On Tue, Oct 13, 2015 at 08:57:57PM -0700, Adam Williamson wrote:

Beyond that, though, why not just have your ansible play ensure its own
deps are installed? If you're dealing with docker, make sure the
package you need is installed before you run any docker steps...

So, in other words, it seems acceptible to make this a documentation
problem? We should at least definitely make sure to have that
documentation.


I haven't poked at this yet, but can add it to the release notes.  Can
someone confirm that at least the dnf module works out of the box?


Define "out of the box". For the fedora cloud image you have to install 
python and python-dnf first. The dnf module will then work, but not 
until you do that.

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-13 Thread Adam Williamson
On Tue, 2015-10-13 at 21:06 -0600, Kevin Fenzi wrote:

> I don't see how that could work. Ansible has tons of modules, which
> ones are "standard" ? Such a package would have a ton of deps... 

Right. Sometimes you need the Docker bits, sometimes you don't.

One thing that's a bit awkward is that you can't install packages OOTB
with Docker on F23, because neither yum nor python2-dnf is installed by
default. *That* seems like arguably a real problem.

Beyond that, though, why not just have your ansible play ensure its own
deps are installed? If you're dealing with docker, make sure the
package you need is installed before you run any docker steps...
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-13 Thread Adam Williamson
On Tue, 2015-10-13 at 20:57 -0700, Adam Williamson wrote:
> On Tue, 2015-10-13 at 21:06 -0600, Kevin Fenzi wrote:
> 
> > I don't see how that could work. Ansible has tons of modules, which
> > ones are "standard" ? Such a package would have a ton of deps... 
> 
> Right. Sometimes you need the Docker bits, sometimes you don't.
> 
> One thing that's a bit awkward is that you can't install packages
> OOTB
> with Docker on F23,

D'oh, of course I meant ansible.
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net


-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-13 Thread Orion Poplawski

On 10/13/2015 08:21 PM, Dusty Mabe wrote:



Hey all,

Just wondering if anyone has started to feel any pain from trying to
use ansible with F23 systems. As part of the Fedora Cloud working
group it would be nice to ship a system that could be targeted by
ansible out of the box. Unfortunately, since ansible uses python 2.X
vs python 3 it doesn't really work.

A simple answer would be to "just install python", but I actually hit
several roadblocks because of python packages that are usually there
but have been replaced by their python 3 counterparts. As an example
for one ansible playbook like [1] I had to install these rpms in order
to get it to work:

python libselinux-python python-dnf python-docker-py

Unfortunately there isn't a catchall that is a workaround for this
problem because the libraries you need on the system depend on the
modules you will use.

Does anyone have a good solution for this? Obviously it would be nice
if ansible went to python3 but I think they have stated clearly that
they are sticking with python2 for backwards compat with systems that
still need 2.4.

-Dusty

[1] - https://github.com/dustymabe/vagrantdirs/blob/master/f22/playbook.yml



I suspect this is probably better to be hashed out in a bugreport, but 
perhaps one solution would be to produce an ansible-runtime meta package 
or comps group that pulls in standard packages needed to run ansible 
locally.  Otherwise I don't see how you get around what you need on a 
system by just installing it.


--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA DivisionFAX: 303-415-9702
3380 Mitchell Lane  or...@cora.nwra.com
Boulder, CO 80301  http://www.cora.nwra.com
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Re: ansible in Fedora 23+ (python3)

2015-10-13 Thread Kevin Fenzi
On Tue, 13 Oct 2015 20:36:39 -0600
Orion Poplawski  wrote:

> On 10/13/2015 08:21 PM, Dusty Mabe wrote:
> >
> >
> > Hey all,
> >
> > Just wondering if anyone has started to feel any pain from trying to
> > use ansible with F23 systems. As part of the Fedora Cloud working
> > group it would be nice to ship a system that could be targeted by
> > ansible out of the box. Unfortunately, since ansible uses python 2.X
> > vs python 3 it doesn't really work.
> >
> > A simple answer would be to "just install python", but I actually
> > hit several roadblocks because of python packages that are usually
> > there but have been replaced by their python 3 counterparts. As an
> > example for one ansible playbook like [1] I had to install these
> > rpms in order to get it to work:
> >
> > python libselinux-python python-dnf python-docker-py

I'm not sure how thats a roadblock... 4 packages and their deps? 

> > Unfortunately there isn't a catchall that is a workaround for this
> > problem because the libraries you need on the system depend on the
> > modules you will use.

Right.

> > Does anyone have a good solution for this? Obviously it would be
> > nice if ansible went to python3 but I think they have stated
> > clearly that they are sticking with python2 for backwards compat
> > with systems that still need 2.4.

Install the python2 packages you need. 

> > -Dusty
> >
> > [1] -
> > https://github.com/dustymabe/vagrantdirs/blob/master/f22/playbook.yml
> >
> 
> I suspect this is probably better to be hashed out in a bugreport,
> but perhaps one solution would be to produce an ansible-runtime meta
> package or comps group that pulls in standard packages needed to run
> ansible locally.  Otherwise I don't see how you get around what you
> need on a system by just installing it.

I don't see how that could work. Ansible has tons of modules, which
ones are "standard" ? Such a package would have a ton of deps... 

kevin


pgp27lHXzivJr.pgp
Description: OpenPGP digital signature
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

ansible in Fedora 23+ (python3)

2015-10-13 Thread Dusty Mabe


Hey all,

Just wondering if anyone has started to feel any pain from trying to
use ansible with F23 systems. As part of the Fedora Cloud working
group it would be nice to ship a system that could be targeted by
ansible out of the box. Unfortunately, since ansible uses python 2.X 
vs python 3 it doesn't really work.

A simple answer would be to "just install python", but I actually hit
several roadblocks because of python packages that are usually there
but have been replaced by their python 3 counterparts. As an example
for one ansible playbook like [1] I had to install these rpms in order
to get it to work:

python libselinux-python python-dnf python-docker-py

Unfortunately there isn't a catchall that is a workaround for this
problem because the libraries you need on the system depend on the
modules you will use.

Does anyone have a good solution for this? Obviously it would be nice
if ansible went to python3 but I think they have stated clearly that
they are sticking with python2 for backwards compat with systems that
still need 2.4.

-Dusty

[1] - https://github.com/dustymabe/vagrantdirs/blob/master/f22/playbook.yml
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct