Re: [ansible-project] Ansible running in Docker Container"Connection refused Failed to connect to new control master"

2019-07-06 Thread Claudio Rivas
Thanks for the hint, I’ll start moving on with your suggestions. I’ll come back to documento t this and let you know. -- 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 e

Re: [ansible-project] Ansible running in Docker Container"Connection refused Failed to connect to new control master"

2019-07-06 Thread Robert Williams
I understand and do not disagree. I would try the process noted on that link. Keep in mind that because you are in a container, you will need to add those to your dockerfile and reaping the container. I'm presently using a main Jenkins container that starts ephemeral ansible/jnlp containers as ex

Re: [ansible-project] Ansible running in Docker Container"Connection refused Failed to connect to new control master"

2019-07-06 Thread Claudio Rivas
Same container. Generating the certificate without passwords makes problems with ssh server. -- 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+u

Re: [ansible-project] Ansible running in Docker Container"Connection refused Failed to connect to new control master"

2019-07-06 Thread Robert Williams
I do not currently have an example of this or an environment to test it in, but a quick search turned up: https://www.calazan.com/using-ssh-agent-forwarding-with-ansible/ You could also regenerate the key without a passphrase or fallback to UN/PW auth. Out of curiosity are you running Jenkins and

Re: [ansible-project] Ansible running in Docker Container"Connection refused Failed to connect to new control master"

2019-07-06 Thread Claudio Rivas
Thank you, yes I have generated the key with a password, but didn’t configured it for the Ansible connection, now I’m searching how to do it, but if you have an example will be helpful. Thank you again -- You received this message because you are subscribed to the Google Groups "Ansible Proje

Re: [ansible-project] Ansible running in Docker Container"Connection refused Failed to connect to new control master"

2019-07-06 Thread Robert Williams
Is your ssh key password protected and if so did you configured forwarding in the ssh-agent or a similar work around? On Sat, Jul 6, 2019, 3:07 PM Indian Velumani wrote: > Hi, > > When want to start a docker image as container means you have run a > command like > docker run -d (image: version).

Re: [ansible-project] Ansible running in Docker Container"Connection refused Failed to connect to new control master"

2019-07-06 Thread Indian Velumani
Hi, When want to start a docker image as container means you have run a command like docker run -d (image: version). On there just add like this docker run --net=host -d (image: version) Then login to the docker using docker exec command Then execute your ansible playbook. On Sun, Jul 7, 2019, 00

Re: [ansible-project] Ansible running in Docker Container"Connection refused Failed to connect to new control master"

2019-07-06 Thread Claudio Rivas
Thank you for your quick response, but where do you suggest to run it? In my case the element that has Ansible is a Docker container. Docker container have Jenkins and Ansible. Ansible script doesn't run any Docker command actually. Sorry is my question sounds dumb but I'm new to Docker and Ansi

Re: [ansible-project] Ansible running in Docker Container"Connection refused Failed to connect to new control master"

2019-07-06 Thread Indian Velumani
Hi, Run docker command with --net=host. Thanks. On Sun, Jul 7, 2019, 00:00 Claudio Rivas wrote: > Hi, > > I'm trying to connect to remote host through SSH and a Private Key to run > a simple test to start working with Ansible to generate my inventories: > > ansible -m ping -i hosts test1 -vvv

[ansible-project] Ansible running in Docker Container"Connection refused Failed to connect to new control master"

2019-07-06 Thread Claudio Rivas
Hi, I'm trying to connect to remote host through SSH and a Private Key to run a simple test to start working with Ansible to generate my inventories: ansible -m ping -i hosts test1 -vvv Hosts file have a simple configuration [test] test1 ansible_host=remote_host ansible_user=remote_user an

[ansible-project] Re: [Best Practices] Deprovisioning Resources

2019-07-06 Thread Ronald Lawhorn
Playbooks should be idempotent so in this case "state" would be a variable set at runtime. At least that's what I strive to do in cases like this. On Friday, July 5, 2019 at 2:52:44 PM UTC-4, Jimmyscene wrote: > > Hey guys, > > I was wondering how most people are handling deprovisioning resources