ansible in Fedora 23+ (python3)

Dusty Mabe dusty at dustymabe.com
Wed Oct 14 16:41:13 UTC 2015


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


More information about the devel mailing list