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
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: "
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) }
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
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
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:
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
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
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
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
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:
11 matches
Mail list logo