[ansible-project] Ansible on Windows Environment

2019-10-22 Thread Harini K
Hi, We followed below steps to use Ansible on Windows. 1. Installing Ansible on Cygwin 2. Using Host machine as Windows machine 3. Using Powershell to perform actions. The issues which we are facing are : 1. On launching any application it launches as background task (service). 2. PSExec

Re: [ansible-project] replace line in multiple files using lineinfile could anyone please help me.

2019-10-22 Thread J
I found this if it works for you. --- - name: test loop files hosts: server gather_facts: no vars: SVNRepName_Location: /mydata/myserver/ConServer1 Password: Ansible tasks: - name: list file and register location raw: find /mydata/myserver/ConServer1 -type f -name

Re: [ansible-project] Reboot wait for port to come available

2019-10-22 Thread Kai Stian Olstad
On 23.10.2019 00:42, 'Chris Bidwell - NOAA Federal' via Ansible Project wrote: > Hi all, > > So I know how to do this for the most part, but I've got two servers that > when I have to reboot them, one needs to be done before the other and > cannot before a specific port comes available. That

Re: [ansible-project] network unreachable

2019-10-22 Thread Kai Stian Olstad
On 22.10.2019 08:50, Julien Cochennec wrote: > I get this error : > > fatal: [ansible-target]: FAILED! => changed=false >msg: 'Failed to connect to repo.anaconda.com at port 443: [Errno 101] Le > réseau n''est pas accessible' >status: -1 >url:

[ansible-project] Reboot wait for port to come available

2019-10-22 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hi all, So I know how to do this for the most part, but I've got two servers that when I have to reboot them, one needs to be done before the other and cannot before a specific port comes available. That port is only accessible from that second server, not the ansible server itself. Does that

[ansible-project] Re: loop through a json object

2019-10-22 Thread Boa Ah
Hi Can you please post your whole task solution coz am having a similar need. My post is here: I need to pull all hostname a and ssh to them https://groups.google.com/forum/m/#!topic/ansible-project/BInJVHkXvjo -- You received this message because you are subscribed to the Google Groups

[ansible-project] Loop on values and ssh

2019-10-22 Thread Boa Ah
Team, I have json response from which am getting query with hosts name. I need to further take all goats names and ssh and run some command. How can I achieve this? Please give complete syntax. @Rahul Rameshbabu may be you can catch this? basically, i have below task that yields above

Re: [ansible-project] Re: Setting up Windows without interaction

2019-10-22 Thread 'J Hawkesworth' via Ansible Project
Ssh support for Windows was merged a little while back so as long as you are running a recent ansible and can get the ssh server support on to your Windows targets, you can give it a whirl. https://github.com/ansible/ansible/pull/47732 Hope this helps Jon -- You received this message

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

2019-10-22 Thread Kai Stian Olstad
On 22.10.2019 22:32, R-JRI wrote: > Ansible shell, script and command modules are to copy or run UNIX script on > remote servers not on Ansible server. In my case, I don't want to copy the > script to run on remote servers. I want to run the script on Ansible > server. Is there a way to accomplish

[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

[ansible-project] replace line in multiple files using lineinfile could anyone please help me.

2019-10-22 Thread SARDARNI NK
--- - hosts: localhost gather_facts: no vars: SVNRepName_Location: /mydata/myserver/ConServer1 tasks: # copy config files to the backup folder it's working - name: Copy each file to backupfolder copy: src: "{{ item }}" dest: "{{ SVNRepName_Location}}/backup-October2019" with_fileglob: - "{{

[ansible-project] replace line in multiple files using lineinfile could anyone please help me.

2019-10-22 Thread SARDARNI NK
--- - hosts: localhost gather_facts: no vars: SVNRepositoryName_Location: /data6/scm_server1/rallyCon tasks: # copy config files to the backup folder this is working - name: Copy each file to backupfolder copy: src: "{{ item }}" dest: "{{ SVNRepositoryName_Location }}/configs-backup-October2019"

[ansible-project] Installing multiple roles from the same repo (Ansible Galaxy)

2019-10-22 Thread Ry
Hi everyone, I'm having difficulties figuring out how I can install two different roles from the same project. Below is the project tree, Project_Name ansible_role role1 role2 The different between these two roles are their configurations hence why they're in the same project

Re: [ansible-project] Nagios downtime Issue with max sessions on remote server

2019-10-22 Thread Kai Stian Olstad
On 22.10.2019 08:57, AD wrote: > Hi All, > > I'm using below playbook to enable/disable nagios downtime. My problem here > is since the hosts in my inventory file are a lot (around min 1000), I'm > running into mux sessions limit Issue on the remote nagios server while > executing the playbook >

Re: [ansible-project] Re: Setting up Windows without interaction

2019-10-22 Thread alicia
Hi Fabiano, Ansible supports authentication using .pem certificates with WinRM to Windows machines - see https://docs.ansible.com/ansible/devel/user_guide/windows_winrm.html#authentication-options

[ansible-project] Re: Setting up Windows without interaction

2019-10-22 Thread Fabiano Sidler
I'm sorry I was terribly unclear. I mean, is there a way to connect to Windows with public key authentication (instead of passwords or, beware, X509 crap)? I'd happily use SSH for Windows as well, but according to the docs, that's not supported. Or will it be a supported way in the future? --

Re: [ansible-project] Ansible Tower 3.5 Attempting to send email notification

2019-10-22 Thread Mike Murphy
Thank you On Tue, Oct 22, 2019 at 11:36 AM Eugéne Roux wrote: > Hi Mike, > > Have a look whether the following resolves your issue: > > https://github.com/ansible/awx/issues/2830 > > > Based on that, one potential resolution is to add "host: SMTPSERVER" to > your playbook; without it the AWX

Re: [ansible-project] Ansible Tower 3.5 Attempting to send email notification

2019-10-22 Thread Eugéne Roux
Hi Mike, Have a look whether the following resolves your issue: https://github.com/ansible/awx/issues/2830 Based on that, one potential resolution is to add "host: SMTPSERVER" to your playbook; without it the AWX docker node will attempt to connect to the conatainer's localhost interface, and

Re: [ansible-project] workaround for serial: 1 failures stopping the entire playbook?

2019-10-22 Thread Kai Stian Olstad
On 22.10.2019 16:37, Rob Wagner wrote: > Searching all morning for a way to make > ansible move onto the next host in a serial strategy even if one task on > one host fails. I'm thinking it's not possible. It is possible. -- Kai Stian Olstad -- You received this message because you are

Re: [ansible-project] Ansible Tower 3.5 Attempting to send email notification

2019-10-22 Thread Mike Murphy
Ok thank you On Tue, Oct 22, 2019 at 11:12 AM Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On 22.10.2019 17:03, Mike Murphy wrote: > > I am attempting to send an email notification from Ansible Tower 3.5.3. I > > This is the list for Ansible and not Tower, contact RedHat support

Re: [ansible-project] Ansible Tower 3.5 Attempting to send email notification

2019-10-22 Thread Kai Stian Olstad
On 22.10.2019 17:03, Mike Murphy wrote: > I am attempting to send an email notification from Ansible Tower 3.5.3. I This is the list for Ansible and not Tower, contact RedHat support for help with Tower. -- Kai Stian Olstad -- You received this message because you are subscribed to the

[ansible-project] Ansible Tower 3.5 Attempting to send email notification

2019-10-22 Thread Mike Murphy
I am attempting to send an email notification from Ansible Tower 3.5.3. I keep getting the following error when testing the notification: Output from task_system.log ERRORawx.main.tasks Send Notification Failed [Errno 111] Connection refused I can manually send mail from that same server.

[ansible-project] ASA dynamic network-object host control

2019-10-22 Thread Sayantan Laha
Dear Team, I am using ansible to put network-object host x.x.x.x for my ASA Can we make this list x.x.x.x dynamic? Otherwise if i use command line arguments to pass then login will be the number of times respect to number of IP. Is there anyway out to read a list of ips and execute the same

Re: [ansible-project] workaround for serial: 1 failures stopping the entire playbook?

2019-10-22 Thread Rob Wagner
Hey Andrew - were you able to get anywhere with this? I tried adding a block/rescue without any luck. Searching all morning for a way to make ansible move onto the next host in a serial strategy even if one task on one host fails. I'm thinking it's not possible. Rob On Wednesday, April 10,

[ansible-project] Ansible tower "fatal error"

2019-10-22 Thread Rupender singh chauhan
Hi Team, *Please help me on this below error. it is Ansible tower server.* TASK [tomcat_instance_create : Pull down keystore from git] task path: /var/lib/awx/projects/_128__tomcat_dev_yaml_b/roles/tomcat_instance_create/tasks/tomcat-ssl-install.yml:29 ESTABLISH LOCAL

[ansible-project] Re: Ansible V2.7 - kerberos: authGSSClientStep() failed:

2019-10-22 Thread 'J Hawkesworth' via Ansible Project
Server not found in kerberos database means that the domain controller is unaware of the server. You mention using hosts file which suggests to me that the machine you want to connect to has not been joined to the domain. You almost certainly wouldn't need to use hosts file as typically joining

Re: [ansible-project] Ansible Play book for the Windows exe file

2019-10-22 Thread 'J Hawkesworth' via Ansible Project
You are using ++Option. I think it will do what you want if you change to --Option syntax. Hope this helps. Jon -- 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

Re: [ansible-project] Ansible Play book for the Windows exe file

2019-10-22 Thread Vikrant
Hi Jon, Thanks, I tried this and working perfectly for me but when I update the java option using below, it will append the new line but if these lines are already existed then also make duplicate entries. - name: change tomcat parameters with the command line win_command: Tomcat_WE.exe

[ansible-project] Want to send mail notification of task completion

2019-10-22 Thread Sayantan Laha
Dear Team, I want to send a mail once task completed. Mail should contains success failure results , which is displayed on task completion. Sayantan -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] Setting up Windows without interaction

2019-10-22 Thread 'J Hawkesworth' via Ansible Project
Most modern versions of windows have winrm enabled by default so provided you have a suitable user with sufficient privileges, you can often connect once the OS has finished booting up. That said, there are a lot of factors that need to be considered depending on how things are set up in the

[ansible-project] Ansible Play book for the Windows exe file

2019-10-22 Thread 'J Hawkesworth' via Ansible Project
Tomcat actually has a command line interface so you can configure it using that using a win_shell command. The command line interface is documented here: https://tomcat.apache.org/tomcat-9.0-doc/windows-service-howto.html Hope this helps, Jon -- You received this message because you are

[ansible-project] playbook hangs indefinitely when remote host goes down in-between execution

2019-10-22 Thread AD
Hi All, I have Issue with playbook getting stuck/hang indefinitely, if remote host goes due to kernel panic during the execution. I have tried using async poll for every task but still run into the Issue. When a server goes into kernel panic, since the ssh connection is still open Ansible

[ansible-project] Nagios downtime Issue with max sessions on remote server

2019-10-22 Thread AD
Hi All, I'm using below playbook to enable/disable nagios downtime. My problem here is since the hosts in my inventory file are a lot (around min 1000), I'm running into mux sessions limit Issue on the remote nagios server while executing the playbook Because of security limitation, we cannot

[ansible-project] Re: network unreachable

2019-10-22 Thread Julien Cochennec
I forgot ton mention that http_proxy and https_proxy are defined on both admin and target Le mardi 22 octobre 2019 08:50:52 UTC+2, Julien Cochennec a écrit : > > Hi, > Searching proxy in this list, I found no answer, so maybe it's not a proxy > issue : > > I run a playbook with following task :

[ansible-project] network unreachable

2019-10-22 Thread Julien Cochennec
Hi, Searching proxy in this list, I found no answer, so maybe it's not a proxy issue : I run a playbook with following task : - name: download miniconda installer get_url: url={{ miniconda_url }} dest={{ miniconda_tmp }}/miniconda.sh mode=0755 register: miniconda_downloaded

Re: [ansible-project] Best practice to test a playbook on a Docker image

2019-10-22 Thread Julien Cochennec
Ok, that's a lot of solutions, I'll test it all. Thank you all. Le lundi 21 octobre 2019 19:29:35 UTC+2, Uriel a écrit : > > Depending on your requirements for parity, you might be able to get away > with using RHEL7 container images for testing. I've recently started > exploring some testing