Re: [ansible-project] Problem with linux debian Ansible

2019-04-11 Thread Karl Auer
Yes, I do understand, and this is a problem you will contiue to have unless you rename the directory. The problem is harmless - you can still use the directory, it will just screw up your command prompt. Unless there is some reason why you cannot rename the directory, you should rename it to some

Re: [ansible-project] How to cast stat.mtime (float) to readable date-time

2019-04-11 Thread Jim Griffiths
Thanks for the advice, Matt! Here's what I ended up using: - debug: msg: “Timestamp of {{logpath}}: {{ '*%Y-%m-%d %H:%M:%S' | strftime*(reg.stat.mtime) }}” Cheers Jim On Thursday, April 11, 2019 at 10:42:59 AM UTC-4, Matt Martz wrote: > > You want something like this: > > - debug

[ansible-project] Re: How do I use snow_record and snow_record find in Ansible? Or should I do something different?

2019-04-11 Thread Beau Gauthreaux
Anybody else have ideas about this? On Tuesday, March 19, 2019 at 3:32:16 PM UTC-4, Beau Gauthreaux wrote: > > I'm trying to gather change record information from ServiceNow. > Specifically I would like to query against a hostname and find if that > server has change ticket open. I came across b

Re: [ansible-project] Problem with linux debian Ansible

2019-04-11 Thread ryad9200000
Hi, I have this directory but it's from windows create it in my linux. In fact, when i write repo + CTL-V then CTL-M i can open this repertory but the curseur is at left and not a right do you understand ? Thanks for your help Karl !! ;) Regards, Le jeudi 11 avril 2019 14:27:31 UTC+2, Karl

Re: [ansible-project] How to cast stat.mtime (float) to readable date-time

2019-04-11 Thread Matt Martz
You want something like this: - debug: msg: "Timestamp of {{ path }}: {{ '%c'|strftime(reg.stat.mtime) }}" Documentation about the strftime filter can be found at https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html On Thu, Apr 11, 2019 at 9:36 AM Jim Griffiths

[ansible-project] How to cast stat.mtime (float) to readable date-time

2019-04-11 Thread Jim Griffiths
I need to display the date-time that a file was last updated. The value can be obtained with stat on the file: - name: Get file stats stat: path="{{ path_of_file }}" register: reg - debug: msg: “Timestamp of {{path}}: {{reg.stat.mtime}}” However the output is meaningless be

Re: [ansible-project] Problem with linux debian Ansible

2019-04-11 Thread Karl Auer
I'm puzzled, why do you want a directory with a carriage return in its name? Anyway - some programs (like ls) will convert control characters to question marks. But most don't, and your prompt string ($PS1) does not. To avoid seeing the carriage return in your prompt, you will have to change your

Re: [ansible-project] Problem with linux debian Ansible

2019-04-11 Thread ryad9200000
Hi Karl Auer, First, thank you very much for your answer complet Mister Karl Auer :) Exactly, the cursor drops down one line, then to the far left of the window. I would like on issue without rename the name of directory. I would like only open this repertory but i don't find in internet :( Re

Re: [ansible-project] Ansible issue with Windows and Chocolatey 0.10.13

2019-04-11 Thread Guillaume Belrose
Hi Jordan, I’ve just tried the approach that you suggested and it worked for me. Thanks for the tip. Guillaume. > On 09 Apr 2019, at 01:42, Jordan Borean wrote: > > Not something I've tested but if you are installing it from the public repo > and not some internal repository you might be

Re: [ansible-project] Problem with linux debian Ansible

2019-04-11 Thread Karl Auer
I'm not sure what you mean by "I get carriage return". Do you mean that when you issue (from the parent directory) the command "cd repertoire?" (that's an actual question mark) the cursor drops down one line, then to the far left of the window? If so, it looks like you have somehow managed to creat

[ansible-project] junos replace pattern

2019-04-11 Thread Michał Szczęśniak
Hi, Is there any way using junos modules in ansible to send "replace pattern" command to Juniper device? I stucked on this. Any help would be greatly appreciated! Michal -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from t

[ansible-project] Problem with linux debian Ansible

2019-04-11 Thread ryad9200000
Hi all, I have Debian linux 8.11 (jessie) with Ansible. My problem is that i have two repertory : *repertoire* *repertoire?* The repertory *repertoire?* it was created since windows so there is surely the character ^M when i try open this content with command line "cd repertoire?" i get a ca

Re: [ansible-project] How to capture/filter stdout_lines

2019-04-11 Thread Saranya Nagaraj
Thankyou Sebastian On Apr 10, 2019 11:16 AM, "Sebastian Meyer" wrote: > On 10.04.19 04:38, Saranya N wrote: > > Stdout_lines that I get contains strings , json in different lines. > > > > I want to capture the last line and copy those contents to a a new Json > file. > > > > How do I capture the

Re: [ansible-project] win_copy azure ansible module not working

2019-04-11 Thread Jordan Borean
If your inventory is targeting localhost then that means it's trying to run a Windows module on the Ansible controller which won't work. You cna use the azure_rm_virtualmachine module to spin up a host but then you will have to use something like 'add_host' [1] to add the host for the current e