ns1 / ns1-ansible-modules

NS1 ansible modules
22 stars 19 forks source link

Module fails in a docker container #3

Closed atulhm closed 8 years ago

atulhm commented 8 years ago

Background: I was able to run the tests per the readme on osx. All Tests pased

When I tried the same in a docker container it fails. Using a dockerfile, created an ansible container Tried with both alpine linux and debian images

I get the following error during playbook run: FAILED! => {"changed": false, "failed": true, "msg": "HTTP Error 400: Bad Request - {\"message\":\"\"[[{'answer': ['192.168.1.0'], 'meta': {'up': True}}, {'answer': ['192.168.1.1'], 'meta': {'up': True}}]]\" is invalid for \"A\" record type\"}\n"}

Dockerfile
# Ansible Controller
#
# VERSION 0.0.1
FROM gliderlabs/alpine:3.4

LABEL Description="This image is used to run ansible similarly across all environments"
anMAINTAINER atul@habitmedia.com

RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk update
RUN apk add ansible bash python py-pip git
RUN apk add openssh-client openssl rsync

RUN pip install 'dopy>=0.3.6,<=0.3.6' nsone

CMD /bin/bash
CheRuisiBesares commented 8 years ago

Hey @atulhm can you check your version of ansible locally for me? I just built the Dockerfile you have and Im seeing that ansible 2.0+ is being installed in that container. This module was only tested in 1.9 and it looks like there were some breaking changes on how arguments are passed to modules in 2.0+. I can take a look at this for you in the next few days hopefully. Not sure what your setup is but if 1.9 works for you that might fast track you to getting around your problem.