group_vars produces error

89 views
Skip to first unread message

Sascha Andres

unread,
Feb 10, 2016, 9:27:46 AM2/10/16
to Ansible Project, livi...@outlook.com
Hello,

I have two machines both running ansible 2.0.0.2 on Ubuntu 14.04.3 LTS. On one machine ( my work machine )
the yaml file works well while on the deployment server it throws an error "ERROR! failed to combine variables, expected dicts but got a 'dict' and a 'AnsibleUnicode'"

---

- hosts: docker_staging
  vars:
  - domain: abc.de
  - web_port: 8008
  - identifier: abc
  - instance: web
  - image_suffix: -web
  - enc_key: 0x0
  tasks:
  - include: tasks/deploy.yaml
  
There is a group_vars/docker_staging.yaml which contains some variables:

---
nginx_blacklist: yes
nginx_servers:
- {
    server_name: abc.de,
    db_name: sta_abc,
    db_pass: password,
    db_user: abc_user,
    db_host: "db.abc.de",
    listen: 80,
    ssl: off,
    proxy_pass: "localhost:8001",
    additionals: [
      "client_max_body_size 200M;"
    ]
  }
  
This worked well on my machine but has thrown the above error on the deployment server. However, when I change the main.yaml to use include_vars and rename group_vars to something 
else it works:

---

- hosts: docker_staging
  vars:
  - domain: abc.de
  - web_port: 8008
  - identifier: abc
  - instance: web
  - image_suffix: -web
  - enc_key: 0x0
  tasks:
  - include_vars: application_vars/docker_staging.yaml
  - include: tasks/deploy.yaml
  
This is odd behaviour. Any help on this?

Kind regards,
Sascha

Sascha Andres

unread,
Feb 12, 2016, 8:14:04 AM2/12/16
to Ansible Project, livi...@outlook.com
When switching to root it works, using a user having sudo rights with NOPASSWD it does not work

nusenu

unread,
Feb 12, 2016, 8:19:09 AM2/12/16
to ansible...@googlegroups.com


Sascha Andres:
> When switching to root it works, using a user having sudo rights with
> NOPASSWD it does not work

did you specify 'become: yes' (for the sudo case)?

signature.asc

Sascha Andres

unread,
Feb 24, 2016, 4:28:45 AM2/24/16
to Ansible Project, nus...@openmailbox.org
I have. it seems related to [v2] 'Timeout (12s) waiting for privilege escalation prompt' when using with_items for commands that last longer than 12 seconds

The fix does not seem to made it's way to 2.0.0.2 release
Reply all
Reply to author
Forward
0 new messages