Re: [ansible-project] Downloading files with a specific regular expression from remote https host to target server local path.

2020-03-27 Thread Dick Visser
if those files are tailor made for you then I would work with the team providing them to find an alternative way of doing this. What if they created a json file containing all the file information and key that with the host info, after the files are generated? On Fri, 27 Mar 2020 at 20:26,

Re: [ansible-project] Downloading files with a specific regular expression from remote https host to target server local path.

2020-03-27 Thread oxido A
well may you will need to read the output of curl and then grep over some html tags... I do some like this : curl grep -o -E 'href="([^"*]+)"' | cut -d '"' -f 2 | sort -n | sed -e 's/\///' | tail -1 this wil give you el name of the last file in the list of href="([^"*]+ in my case there are

Re: [ansible-project] Downloading files with a specific regular expression from remote https host to target server local path.

2020-03-27 Thread Tom K.
Let's assume a real site: http://mirror.centos.org/centos/7/os/x86_64/Packages/ wget -r -nd --no-parent -A '*glib*' http: //mirror.centos.org/centos/7/os/x86_64/Packages/ Grabs all the packages that have glib in the name. Now you're also

Re: [ansible-project] save stdout to file on localhost.

2020-03-27 Thread Kai Stian Olstad
On Fri, Mar 27, 2020 at 09:10:32AM -0700, 'Mario Garcia' via Ansible Project wrote: > --- > - name: get users from hosts > hosts: all > gather_facts: no > > tasks: > > - name: get users > getent: > database: passwd > > > - name: get sudo rights > shell: > cmd:

Re: [ansible-project] Downloading files with a specific regular expression from remote https host to target server local path.

2020-03-27 Thread Dick Visser
The recursive (-r) option of wget only downloads files that are 'visible'. This works fine for stuff like a web page with indexed directory listings etc. But anything that is not listed won't be magically retrieved. If a site does not contain any links to content that is actually there, wget will

[ansible-project] save stdout to file on localhost.

2020-03-27 Thread 'Mario Garcia' via Ansible Project
i want to query all the users on the hosts of my inventory and create afile for each hosts with all the privileges for each user I know that htere tools like freeipa but we do not have those in place so i am using the getent wrapper to get all the users on the hosts included the netgroups..

Re: [ansible-project] Downloading files with a specific regular expression from remote https host to target server local path.

2020-03-27 Thread Tom K.
Thanks Dick! I've started to get that impression after searching for quite some time. Currently using a shell command like this to get only specific files down: wget -r -nd --no-parent -A '*pattern*' http://site.com/path/to/file/ Hence why I was thinking it might be possible in Ansible.

[ansible-project] Windows Host Unreachable

2020-03-27 Thread Marco Passarinho
Hello, I'm getting the following error when trying to win_ping my windows host: Command: ansible VMs -m win_ping Response: xx.xx.xx.xxx | UNREACHABLE! => { "changed": false, "msg": "basic: HTTPSConnectionPool(host='xx.xx.xx.xxx', port=5986): Max retries exceeded with url: /wsman

Re: [ansible-project] Re: expect and "Press to continue."

2020-03-27 Thread Jean-Yves LENHOF
I think 'Question' is not a parameter, it's the real question in the sample of ansible expect module I think you could probably remove this line as you want only one answer to each question. Regards, Le 27/03/2020 à 11:18, Jost Rakovec a écrit : Hi is that possible to do with ansible or

Re: [ansible-project] nfs client ansible

2020-03-27 Thread Jean-Yves LENHOF
Wrong argument : sate --> state Regards, Le 27/03/2020 à 10:34, sandy.h...@abagile.com a écrit : no BR Sandy *From:*ansible-project@googlegroups.com *On Behalf Of *Mark Whaite *Sent:* Friday, March 27, 2020 5:16 PM *To:* ansible-project@googlegroups.com *Subject:* Re:

[ansible-project] Re: expect and "Press to continue."

2020-03-27 Thread Jost Rakovec
Hi is that possible to do with ansible or no one knows? thanks On Monday, March 23, 2020 at 9:48:37 PM UTC+1, Jost Rakovec wrote: > > Hi > > how can I use expect module to responds to "Press to continue." > during installation of software on linux? > > The questins during installations

RE: [ansible-project] nfs client ansible

2020-03-27 Thread sandy.hung
no BR Sandy From: ansible-project@googlegroups.com On Behalf Of Mark Whaite Sent: Friday, March 27, 2020 5:16 PM To: ansible-project@googlegroups.com Subject: Re: [ansible-project] nfs client ansible Hi Are you missing a : from the src? On Fri, 27 Mar 2020 at 09:08,

Re: [ansible-project] nfs client ansible

2020-03-27 Thread Vladimir Botka
On Fri, 27 Mar 2020 09:15:38 + Mark Whaite wrote: > Are you missing a : from the src? > > On Fri, 27 Mar 2020 at 09:08, Sandy Hung wrote: > > fatal: [192.168.1.120]: FAILED! => { > > [...] > > "msg": "Unsupported parameters for (mount) module: sate Supported > > parameters include:

Re: [ansible-project] nfs client ansible

2020-03-27 Thread Mark Whaite
Hi Are you missing a : from the src? On Fri, 27 Mar 2020 at 09:08, Sandy Hung wrote: > dear all: > > fatal: [192.168.1.120]: FAILED! => { > "changed": false, > "invocation": { > "module_args": { > "dump": "0", > "fstype": "nfs", > "opts":

[ansible-project] nfs client ansible

2020-03-27 Thread Sandy Hung
dear all: fatal: [192.168.1.120]: FAILED! => { "changed": false, "invocation": { "module_args": { "dump": "0", "fstype": "nfs", "opts": "defaults,nobootwait", "passno": "2", "path": "/nfs", "sate": "mounted",