[ansible-project] Removing empty strings from a list

2018-12-17 Thread Karl Auer
I am trying to build a list of names from a list of objects. It works fine, but some of the objects don't have a name. No problem, I use the default() filter to set those elements of my list to empty strings, like this: # Build a list of names from a list of things - set_fact: names: "{{ name

[ansible-project] Mail Module: "Connection unexpectedly closed: timed out"

2018-12-17 Thread Bharath Kumar
Hello Ansible Team/Users, I have a Playbook which is expected to send an email, as below. When run, it errors out with "Unable to Connect mailer.domain.com:25: Connection unexpectedly closed: timed out". --- - hosts: localhost gather_facts: yes vars_prompt: - name: file prompt: "

[ansible-project] failure to parse `environment`

2018-12-17 Thread Barry Kaplan
I am running - name: Install logstash {{ logstash_apt_version }} apt: pkg: "logstash={{ logstash_apt_version }}" state: present force: "{{ logstash_apt_force | default(false) }}" environment: "{{ logstash_environment | default(omit) }

[ansible-project] Re: Ansible : Deploy task in round robin fashion

2018-12-17 Thread Eric Brewer
So you could probably approach this a few different ways. If you know the host in the group, you could apply a when conditional when: inventory_hostname == "" That would allow you to evaluate which server to run it on for the given group. If you don't care which one it gets run on, and you h

[ansible-project] Re: Using variable in "hosts" definition

2018-12-17 Thread Eric Brewer
Do you have anything written in the task portion? You only showed the task line, but that is also where your head command cuts off. If you don't have anything written after that, that is most likely your problem. If you do have something written after that, we would need to see what you have

Re: [ansible-project] vmware_guest module Ansible 2.7.4 on latest RHEL 7u6

2018-12-17 Thread Tuyen Nguyen
I was previously using Ansible 2.7.0 and I downgraded it back to 2.7.0 and things are working like they were now. I had another issue where it was not allowing authentication on my account for some reason, and reverting back to 2.7.0 fixed it complete. On Monday, December 17, 2018 at 11:58:

Re: [ansible-project] vmware_guest module Ansible 2.7.4 on latest RHEL 7u6

2018-12-17 Thread Tuyen Nguyen
I see... thanks! let me find 2.7.5 to upgrade to. On Monday, December 17, 2018 at 11:58:23 AM UTC-5, Dick Visser wrote: > > It looks like this issue was introduced after 2.7.2, and fixed in > 2.7.5: https://github.com/ansible/ansible/issues/49487. > You're right in between with 2.7.4. > So eit

Re: [ansible-project] vmware_guest module Ansible 2.7.4 on latest RHEL 7u6

2018-12-17 Thread Dick Visser
It looks like this issue was introduced after 2.7.2, and fixed in 2.7.5: https://github.com/ansible/ansible/issues/49487. You're right in between with 2.7.4. So either downgrade to 2.7.2 or upgrade to 2.7.5. DIck On Mon, 17 Dec 2018 at 14:25, Tuyen Nguyen wrote: > > Hi > > I am getting the foll

[ansible-project] vmware_guest module Ansible 2.7.4 on latest RHEL 7u6

2018-12-17 Thread Tuyen Nguyen
Hi I am getting the following error when I try running a playbook to create a new VM from a template. It worked before I did yum update on the control server. The full traceback is: Traceback (most recent call last): File "/root/.ansible/tmp/ansible-tmp-1545052613.45-19770221069605/Ansiball

[ansible-project] Re: Using variable in "hosts" definition

2018-12-17 Thread Ilya Ulis
I forgot to mention versions: ansible = 2.7.0 python version = 2.7.5 понедельник, 17 декабря 2018 г., 11:43:54 UTC+2 пользователь Ilya Ulis написал: > > I have a role with the following yaml: > [root@ansible playbooks]# head -n 4 roles/upgrade_couchbase/tasks/main.yml > - hosts: COUCHBASE-cluster

[ansible-project] Using variable in "hosts" definition

2018-12-17 Thread Ilya Ulis
I have a role with the following yaml: [root@ansible playbooks]# head -n 4 roles/upgrade_couchbase/tasks/main.yml - hosts: COUCHBASE-cluster-{{ couchbase_environment }} serial: 1 become: yes tasks: and a playbook: [root@ansible playbooks]# cat update_couchbase.yml - tasks: - import_role: