It's works. Thank you Stefen
On Wed, 26 Feb, 2020, 12:13 am Stefan Hornburg (Racke),
wrote:
> On 2/24/20 9:52 PM, Dick Visser wrote:
> > You can’t resolve variables with names that contain variables
> themselves.
> > Instead, use a lookup:
> >
> >
@Stefan i tried using quote but it does not help. Can you confirm if this
is the right way to use quote ? See below:
excludefolders: "{{ excludefolders + ' -o -name ' + item | quote |
default('') }}"
On Wednesday, February 26, 2020 at 12:42:57 PM UTC+5:30, Stefan Hornburg
(Racke) wrote:
>
Hi ,
1. I have multiple json as well as j2 files , Need to generate multiple
config files by using template module.
2. In fetch module . fetch the files with including host name in path .
How we can avoid this hostname in path ?
Ex:
- name: fetch tar file from remote to local machine
On 2/26/20 8:05 AM, Shifa Shaikh wrote:
> Below is my playbook:
>
> |
> -set_fact:
> excludefolders:"{{ excludefolders + ' -o -name ' + item | default('')
> }}"
> with_items:"{{ lookup('vars', 'EXCLUDE_' + Layer).split(',') }}"
>
>
> -debug:
> msg:"excludedfolder is {{
Below is my playbook:
- set_fact:
excludefolders: "{{ excludefolders + ' -o -name ' + item |
default('') }}"
with_items: "{{ lookup('vars', 'EXCLUDE_' + Layer).split(',') }}"
- debug:
msg: "excludedfolder is {{ excludefolders }}"
I get the below output
ok:
You can try this -
- set_fact:
excludefolders: "{{ excludefolders | default('') + ' -o -name ' +
item | default('') }}"
with_items: "{{ lookup('vars', 'EXCLUDE_' + Layer).split(',') }}"
On Wed, Feb 26, 2020 at 12:00 PM Shifa Shaikh wrote:
> I need to set_fact variable and
I need to set_fact variable and contact to itself a list of items as below:
- set_fact:
excludefolders: "{{ excludefolders + ' -o -name ' + item |
default('') }}"
with_items: "{{ lookup('vars', 'MY_' + Layer).split(',') }}"
Getting error:
FAILED! => {"msg": "The task
if ansible controller having no rsync command , it is showing following
error
Could not chdir to home directory /home/unixawx: No such file or
directory\nbash: rsync: command not found\nrsync: connection unexpectedly
closed (0 bytes received so far) [Receiver]\nrsync error: remote command
On 2/24/20 9:52 PM, Dick Visser wrote:
> You can’t resolve variables with names that contain variables themselves.
> Instead, use a lookup:
>
> https://docs.ansible.com/ansible/latest/plugins/lookup/vars.html
>
> Also try to use the args: chdir option instead of doing &&, see
>
On 2/25/20 4:27 PM, jean-christophe manciot wrote:
>
> {{ var }} is already a yaml object: it is the list of dictionaries.
Good .. so there is no point to using shell + sed here, right?
Loop over the list of dictionaries and manipulate it with "set_fact".
Maybe you can give an example how a
{{ var }} is already a yaml object: it is the list of dictionaries.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Sure , i will post it here
thanks
On Tuesday, February 25, 2020 at 8:23:37 PM UTC+5:30, Stefan Hornburg
(Racke) wrote:
>
> On 2/25/20 3:49 PM, Janmejaya Swain wrote:
> > Thanks Racke , its work for me
> >
>
> Well if you don't mind please post your resulting task so other list
> members
Hi ,
I have multiple json as well as j2 files , Need to generate multiple config
files by using template module
On Wednesday, February 19, 2020 at 7:42:56 PM UTC+5:30, Janmejaya Swain
wrote:
>
> Hi ,
>
> Can any one please help on this, which is very appreciable. .
>
> ---
> - hosts: all
Thanks for confirming the syntax looks ok.
On Tuesday, February 25, 2020 at 9:44:32 AM UTC-5, Dick Visser wrote:
>
> There is nothing wrong with that variable.
> As the error says, it may be elsewhere in the file depending on the
> exact syntax problem.
> In fact, it might not even be in
>
On 2/25/20 3:48 PM, jean-christophe manciot wrote:
> ansible 2.9.5 (pip3)
>
> The following sed command:
> - function is to replace all '_' by '-' in all keys only (and not values)
> within a list of dictionaries in memory
> - uses character classes which are probably not supported by
On 2/25/20 3:49 PM, Janmejaya Swain wrote:
> Thanks Racke , its work for me
>
Well if you don't mind please post your resulting task so other list members
can see how you use synchronize.
Simply stating "it doesn't work" or "it works for me" without a task to refer
to doesn't really work for
ansible 2.9.5 (pip3)
The following sed command:
- function is to replace all '_' by '-' in all keys only (and not values)
within a list of dictionaries in memory
- uses character classes which are probably not supported by regex_replace:
+ [:blank:]: space and tab
+ [:space:]: tab, newline,
Thanks Racke , its work for me
On Tuesday, February 25, 2020 at 6:42:31 PM UTC+5:30, Stefan Hornburg
(Racke) wrote:
>
> On 2/25/20 1:56 PM, Janmejaya Swain wrote:
> > Thank u Jordan and Dick ,
> >
> > Can you please help to know , how can we fetch folder from remote to
> controller as
On Tue, 25 Feb 2020 06:07:52 -0800 (PST)
Nicolas Wright wrote:
> db_connectionstring: "User ID=myuser;Initial Catalog=mycatalog;Data
> Source=db\\instance;persist security info=True;password=mypass;Pooling=True"
> [...]
> 2020-02-25T14:01:13.6121920Z ##[error]ERROR! Syntax Error while loading
There is nothing wrong with that variable.
As the error says, it may be elsewhere in the file depending on the
exact syntax problem.
In fact, it might not even be in
/var/lib/rundeck/ansible/inventories/vin_qa01/group_vars/all/vars.yml
(which you didn't post).
A clue is found here: 'There appears
Hello,
any clues what is a workaround for the syntax issue below? This variable is
defined in a group among other variables. My playbook won't run because of
this error. I may have to escape the =.. I m hoping to keep the string as
human friendly as possible though. I am using quote so I can
On 2/25/20 1:56 PM, Janmejaya Swain wrote:
> Thank u Jordan and Dick ,
>
> Can you please help to know , how can we fetch folder from remote to
> controller as fetch module not supported folders
> rather than files.
> i can able to fetch multiple files but not able to fetch folders .
>
hi, i had a look into the issue again.
it seems that some updates were filtered because of the categories. that is
ok (.net is featurepack). but i don't know why the sql server sp2 gdr
wasn't found (
Thank u Jordan and Dick ,
Can you please help to know , how can we fetch folder from remote to
controller as fetch module not supported folders rather than files.
i can able to fetch multiple files but not able to fetch folders .
On Wednesday, February 19, 2020 at 7:42:56 PM UTC+5:30,
We faced the same problem in our production. So if the node is
slow//sluggish or goes unresponsive while playbook is running, Ansible will
not leave the connection or in other words will keep waiting for output
from the node(s). Well, in the case, playbooks seems to be hang.
Try to use async poll
25 matches
Mail list logo