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

2019-07-08 Thread Claudio Rivas
Hi Robert, thanks for the advice and the link. I've tried the mentioned method and noticed there's a directory known as "cp"on the route "/var/jenkins_home/.ansible" (yes, with a dot) where a file is generated while trying to connect to the remote server where generates a file named "45a4bb8b49

[ansible-project] How to adapt tempfile to cfg

2019-07-08 Thread Pierre Ochsenbein
Hey guys, I use the following template file .j2 to update config file on remote host. *Template file: pg_hba.conf.j2* {% for slave in groups['slaves'] %} hostreplication {{ postgresql_streaming_user.name }}{{ hostvars[slave]*['ansible_all_ipv4_addresses']* }}/32

[ansible-project] Ansible NTP Roles

2019-07-08 Thread Keith Mills
My name is Keith and I'm a Systems Engineer with HPE, Houston, TX location. We use Ansible here for configuration management but I'm new to Ansible and would like your help with Ansible NTP Roles. This is what I have so far: /roles/base/tasks/main.yml: --- ## PLAYBOOK TO INSTALL AND CONFIGURE

RE: [ansible-project] Ansible NTP Roles

2019-07-08 Thread p.cook...@bham.ac.uk
Hi Keith Might be worth looking into Ansible Galaxy Roles – following Link actually gives NTP as an example too: https://www.linuxtechi.com/use-ansible-galaxy-roles-ansible-playbook/ Regards Phil From: ansible-project@googlegroups.com On Behalf Of mills.kei...@gmail.com Sent: 08 July 2019 1

Re: [ansible-project] Ansible NTP Roles

2019-07-08 Thread Keith Mills
Thanks for the info Phil, I will take a look. On Monday, July 8, 2019 at 9:16:45 AM UTC-5, p.co...@bham.ac.uk wrote: > > Hi Keith > > > > Might be worth looking into *Ansible Galaxy Roles* – following Link > actually gives NTP as an example too: > > > > https://www.linuxtechi.com/use-ansible-

Re: [ansible-project] How to adapt tempfile to cfg

2019-07-08 Thread Kai Stian Olstad
On 08.07.2019 15:30, Pierre Ochsenbein wrote: > *Template file: pg_hba.conf.j2* > > {% for slave in groups['slaves'] %} > hostreplication {{ postgresql_streaming_user.name > }}{{ hostvars[slave]*['ansible_all_ipv4_addresses']* > }}/32 {{ postgresql_default_ipv4

Re: [ansible-project] How to adapt tempfile to cfg

2019-07-08 Thread Pierre Ochsenbein
Solution looks like this : ['ansible_default_ipv4']['address'] Le lun. 8 juil. 2019 à 16:55, Kai Stian Olstad < ansible-project+l...@olstad.com> a écrit : > On 08.07.2019 15:30, Pierre Ochsenbein wrote: > > *Template file: pg_hba.conf.j2* > > > > {% for slave in groups['slaves'] %} > > host

[ansible-project] cert_file error with aws_ec2 inventory plugin

2019-07-08 Thread James Wallace
Hey all, I'm having an issue using the aws_ec2 inventory plugin and I can't seem to find a solution. ansible 2.8.1 config file = /home/jwallace/nxt-devops/ansible/ansible.cfg configured module search path = [u'/home/jwallace/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']

RE: [ansible-project] using different remote_user until success

2019-07-08 Thread william.dossett
Hi Brian, this seemed like a good way to do it, but I haven't been able to make it work - I haven't done much logic in my plays... mostly just point and shoot tasks. --- - hosts: test gather_facts: false tasks: - name: try users remote_user: "{{ item }}" ping: ignore_unreachabl

RE: [ansible-project] using different remote_user until success

2019-07-08 Thread william.dossett
Sorry, pressed send inadvertently there... -Original Message- From: william.doss...@gmail.com Sent: Monday, July 8, 2019 10:09 AM To: ansible-project@googlegroups.com Subject: RE: [ansible-project] using different remote_user until success Hi Brian, this seemed like a good way to do it,

Re: [ansible-project] using different remote_user until success

2019-07-08 Thread Dan Linder
Are you opposed to using a second playbook and using the "include:" module like this? --- - hosts: all gather_facts: false tasks: - name: try users #remote_user: "{{ item }}" include: include-3.yml vars: my_remote_user: "{{ item }}" with_items: - centos - r

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

2019-07-08 Thread Claudio Rivas
Ok the thing now is running, seems it needs to store on a temporal repository, mine was pointing to /var/jenkins/.ansible, so y generated a ansible.cfg with this configuration on the same folder where my hosts file is: ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s control_path = /de

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

2019-07-08 Thread Robert Williams
Happy to hear its working for you! ssh-agent likely gets a little tricky when in the container. I can't speak to a better way to do this as I havent had to overcome the Passphrase-protected keys yet. That said, if you continue to have issues, let me know what OS Base you are using for the containe

RE: [ansible-project] using different remote_user until success

2019-07-08 Thread william.dossett
Thanks, I think that is sort of what my colleague was alluding to – slightly more elegant though. So, it will run include-3.yml 3 times? And one will succeed? I obviously have a number of tasks to run after this… I was kind of hoping to keep this logic all in one with the idea that I

[ansible-project] Re: Win_wait_for arbitrary results

2019-07-08 Thread Jordan Borean
You need to include more info, just saying it waits arbitrary isn't enough for anyone to go by. Can you share some more info like; - The playbook/tasks you are using - Exactly what state the service is expected to be in and what you are waiting for - What do you man by arbitrary res

[ansible-project] Issue : Regarding "Add ability to rate limit data transfer #12684"

2019-07-08 Thread Uday Kulkarni
Hi, I have installed ansible version 2.7.8 on Redhat Linux 7.4 and have noticed following issue, If I use "scp-extra-args" with option "-l" within playbook this option is not getting into effect. Which means if I mention the bandwidth to use with this option it is still taking the default band