Closed Claud closed 10 years ago
Issue Type: Bug Report Ansible Version: ansible 1.7.2 Environment: Ubuntu 14.04
Summary: /playbook.yml
--- - name: Create of user hosts: 'all' sudo: yes roles: # Add main user with sudo access. - role: add_user add_user__user: name: 'ansible-runner'
/roles/add_user/vars/main.yml
--- _home_path: '/home/{{ add_user__user.name }}'
/group_vars/* or /host_vars/*
--- add_user__user: name: 'master'
/roles/add_user/task/main.yml
--- - include_vars: main.yml - debug: msg='{{ _home_path }}'
If I run this task. I see this:
TASK: [add_user | debug msg='/home/ansible-runner'] *** ok: [192.168.142.3] => { "msg": "/home/ansible-runner" }
I think that's right.
But if I change task to this:
--- - debug: msg='{{ _home_path }}'
TASK: [add_user | debug msg='/home/ansible-runner'] *** ok: [192.168.142.3] => { "msg": "/home/master" }
This is unpredictable. Why is the variable of the playbook has a low priority?
So it must be, or this is a bug?
Issue Type: Bug Report Ansible Version: ansible 1.7.2 Environment: Ubuntu 14.04
Summary:
/playbook.yml
/roles/add_user/vars/main.yml
/group_vars/* or /host_vars/*
/roles/add_user/task/main.yml
If I run this task. I see this:
I think that's right.
But if I change task to this:
/roles/add_user/task/main.yml
This is unpredictable. Why is the variable of the playbook has a low priority?
So it must be, or this is a bug?