> On 2015-12-13, at 01:07, Igor Cicimov wrote:
>
> Well of course they get overwritten in the *same* play since all variables
> are *global* during the play execution,
Well, until yesterday I wouldn't say "of course". If I used host variables,
then I would understand this as being "of course"
Well of course they get overwritten in the *same* play since all variables
are *global* during the play execution, otherwise if you call group1 after
group0 what will happen is group1 will get the variables from group0, which
is not desirable, right?
What you need to do is rethink your playbook
I /think/ I know where the problem comes from: I encountered it with group vars
defined in the inventory file. I eventually moved both the role variables and
group_vars into inventory file, trying to establish one place where the
variables are defined. Now:
My inventory file looks like this (IP
Also if you can put
- debug: var=destination
before and after every include call would be very helpful to see where the
var actually gets changed.
Just realized that my previous message might not be clear enough, what I
mean is add:
--extra-vars '{"destination":"some_value_here"}'
to the ans
Just out of curiosity, what happens when you supply destination via
extra_vars and leave everything as it was in defaults file?
On Friday, December 11, 2015 at 11:09:30 AM UTC+11, silverdr wrote:
>
>
> > On 2015-12-10, at 23:13, Igor Cicimov > wrote:
> >
> > Strange, because I'm sure every ti
> On 2015-12-10, at 23:13, Igor Cicimov wrote:
>
> Strange, because I'm sure every time I call a tasks file from another role I
> have to explicitly include that role's defaults|vars file via vars_files to
> be able to use its variables.
Actually I stay within one role. The problem is that wh
> On 2015-12-10, at 23:13, Igor Cicimov wrote:
>
> Strange, because I'm sure every time I call a tasks file from another role I
> have to explicitly include that role's defaults|vars file via vars_files to
> be able to use its variables. So you are saying you are seeing this happen
> without
Strange, because I'm sure every time I call a tasks file from another role I
have to explicitly include that role's defaults|vars file via vars_files to be
able to use its variables. So you are saying you are seeing this happen without
this linking. Do you mind showing us the whole main playbook
> On 2015-12-09, at 22:35, Igor Cicimov wrote:
>
> Do you by any chance have some of those vars also defined in the
> group_vars/all file? In that case they overide the ones in the roles default
> file causing unexpected results for people unaware of this fact.
No, that would actually explain
Do you by any chance have some of those vars also defined in the group_vars/all
file? In that case they overide the ones in the roles default file causing
unexpected results for people unaware of this fact.
--
You received this message because you are subscribed to the Google Groups
"Ansible P
> On 2015-12-09, at 00:10, Brian Coca wrote:
>
> I'm not understanding the problem, can you post an acual example and also
> what versions you are using?
There are several roles with practically the same structures:
- role0
- defaults
- main.yml
- tasks
- main.yml
- task1.yml
Hello, group, I encountered a strange problem with variables when running a
role. The role has some defaults and the variables are used throughout the
plays. At some point in the tasks/mains playbook, there are included other
tasks from the same directory. Those also include tasks from root
dir
12 matches
Mail list logo