[ansible-project] Get file(s) from a remote host to local host

2019-09-18 Thread R-JRI
Hi, I created a simple yml file to get file or files from a remote host to local host: $ cat fetch.yml --- - hosts: serverA tasks: - name: find the files find: paths: /usr/local/apps/log patterns: AppsAdmin.*.ALLAPPS.20190828* use_regex: True register: Apps_files

[ansible-project] Re: Get file(s) from a remote host to local host

2019-09-19 Thread R-JRI
Thanks, Brian That works. On Wednesday, September 18, 2019 at 2:31:17 PM UTC-4, R-JRI wrote: > > Hi, > > I created a simple yml file to get file or files from a remote host to > local host: > $ cat fetch.yml > --- > - hosts: serverA > > tasks: >

[ansible-project] Run a unix script on ansible server that connect to remote servers.

2019-10-22 Thread R-JRI
Hi, all I have an existing unix shell script that does ssh to connect to remote servers to search FAILED key word through logs on the remote server. If the logs contain FAILED key word, sftp to the servers to bring the logs to a central server and analyzes them. Now we want to launch the unix s

[ansible-project] Re: Run a unix script on ansible server that connect to remote servers.

2019-10-24 Thread R-JRI
y yml file content: --- - name: grab log hosts: ansidev (this is the host name of ansible server) tasks: - name: get log command: /usr/local/bin/failed_log_analysys.sh On Tuesday, October 22, 2019 at 4:32:21 PM UTC-4, R-JRI wrote: > > Hi, all > > I have an existing

[ansible-project] Re: Run a unix script on ansible server that connect to remote servers.

2019-10-28 Thread R-JRI
Thanks, Kai Once I changed to localhost instead host name. Ansible is able to grab logs from remote hosts. On Tuesday, October 22, 2019 at 4:32:21 PM UTC-4, R-JRI wrote: > > Hi, all > > I have an existing unix shell script that does ssh to connect to remote > servers to search

[ansible-project] Run script that requires 'sudo' on remote hosts.

2019-03-27 Thread R-JRI
Hi, all We have an application stop/start script that starts/stops application without root privilege and with 'sudo'. If I am on the host, I login as the application user and then run the script to stop/start application as 'sudo application_stop_start.sh stop/start'. On the ansible server (

Re: [ansible-project] Run script that requires 'sudo' on remote hosts.

2019-03-28 Thread R-JRI
Hi, Sebastian I did not say clearly. I checked my ansible.cfg and it has 'become = true' in it and ran failed. On Wednesday, March 27, 2019 at 4:57:48 PM UTC-4, Sebastian Meyer wrote: > On 27.03.19 21:29, R-JRI wrote: > > I don't need 'become' and 'bec

Re: [ansible-project] Run script that requires 'sudo' on remote hosts.

2019-03-28 Thread R-JRI
E-SUCCESS-fxdiujleiigrbgciqkixarzuxhsbngrr; /usr/bin/python /u/appadmin/.ansible/tmp/ansible-tmp-1553780641.69-82349845573466/AnsiballZ_setup.py' as root on host1.\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1} On Wednesday

Re: [ansible-project] Run script that requires 'sudo' on remote hosts.

2019-03-28 Thread R-JRI
Thanks Sebastian. I added warning option as you suggested and the warning message went away and applications can be stopped/started. On Thursday, March 28, 2019 at 10:21:23 AM UTC-4, Sebastian Meyer wrote: > Hi, > > On 28.03.19 14:49, R-JRI wrote: > > TASK [