Using variables from var_files in serial

75 views
Skip to first unread message

Ruben Oostinga

unread,
Jan 15, 2015, 12:19:56 PM1/15/15
to ansible...@googlegroups.com
Hi,


I am currently upgrading from ansible 1.7 to 1.8 and my current playbooks are not working anymore. I have batch_size defined in a vars_file and I would like to use this as my serial size.

My playbook looks like this:

---
- hosts: 127.0.0.1
serial: "{{ batch_size }}"
vars_files:
- params/{{ env }}/params.yml


And the error is:
ValueError: invalid literal for int() with base 10: '{{ batch_size }}'


I tried also tried using group vars, same issue.

This also works
vars:
batch_size: 2


But this didn't
vars_files:
- params/{{ env }}/params.yml

vars:
batch_size_var: "{{ batch_size }}"


Using the -e flag works but I want to keep the variable next to my other variables in params.yml.

I currently changed everything to serial: 50%, but there should be better solution.


What am I doing wrong?

Ruben Oostinga

unread,
Jan 23, 2015, 5:09:12 AM1/23/15
to ansible...@googlegroups.com
Anyone?

I am considering posting this as a bug in ansible 1.8.

Op donderdag 15 januari 2015 18:19:56 UTC+1 schreef Ruben Oostinga:
Reply all
Reply to author
Forward
0 new messages