[ansible-project] Manage multiple aws accounts with ansible playbook using ec2.py/ec2.ini

2019-03-19 Thread naga babu
I have multiple aws accounts. I would like to manage all these accounts using ansible playbooks. ex. provisioning new machines etc.. But when I use profile/AWS_PROFILE option it always taking default profile not going to specified profiles. It says specified vpc does not exist as it is

[ansible-project] Re: Make a list from list of dicts

2019-03-19 Thread Ashok
Another way to state my requirement: Form a list of values of `destination`. And, in `rules` where `destination` and `path` occur together, ignore `destination` and take up corresponding value of `path`. My desired output: logf_dest: - /logs/apache-servers/*.log -

[ansible-project] Make a list from list of dicts

2019-03-19 Thread Ashok
Hi all... I've a list of dicts like the below: client_destinations: apache-servers: pre_cmd: '$template custom,"/logs/apache-servers/%source%.log"' rules: - var: '$syslogfacility-text' operator: 'contains' search: 'local5' destination: '-?custom'

Re: [ansible-project] Convert a text file with list of strings into yml help

2019-03-19 Thread Kai Stian Olstad
On 19.03.2019 20:09, Saranya N wrote: > I'm having a text file with lots of strings like below. > > Cat test.txt > String1 > String2 > . > . > . > Etc > > I literally have 2k of strings on that file. > > I want to convert to yank like below. > > _ _ _ > > Listofstrings: >- string1 >-

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

2019-03-19 Thread Beau Gauthreaux
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 both of these modules for Ansible. I have had little success getting them to function properly. I'm hoping my

[ansible-project] Convert a text file with list of strings into yml help

2019-03-19 Thread Saranya N
I'm having a text file with lots of strings like below. Cat test.txt String1 String2 . . . Etc I literally have 2k of strings on that file. I want to convert to yank like below. _ _ _ Listofstrings: - string1 - string2 ...etc I can achieve this via shell script but is there an ansible

RE: [ansible-project] replace module cannot crashes when encountering Danish characters

2019-03-19 Thread 'Mark Tovey - DSV' via Ansible Project
A very good point. I was looking at it as a file of strings that needed to be modified. It didn't occur to me to look at the purpose of the file and any modules written directly for the file. Thanks! -Mark

Re: [ansible-project] replace module cannot crashes when encountering Danish characters

2019-03-19 Thread S C Rigler
Assuming you're talking about the local /etc/passwd file, the user module can handle the gecos field. --Steve On Tue, Mar 19, 2019 at 12:47 PM 'Mark Tovey - DSV' via Ansible Project wrote: > > > > Thanks! > > > > > >

RE: [ansible-project] replace module cannot crashes when encountering Danish characters

2019-03-19 Thread 'Mark Tovey - DSV' via Ansible Project
Thanks! -- [Description: cid:image001.gif@01D09EC0.4CEB1A90]Mark Tovey - UNIX Engineer DSV | 110 N Marine Dr. | Bldg 1 | Portland | Oregon | 97217 |

Re: [ansible-project] replace module cannot crashes when encountering Danish characters

2019-03-19 Thread Amit Bhardwaj
I think https://github.com/ansible/ansible/issues is your best bet. Regards AB On Tue, Mar 19, 2019 at 10:33 PM 'Mark Tovey' via Ansible Project < ansible-project@googlegroups.com> wrote: > > I am working on a playbook to replace the comment field in a server's > password file. I was trying

[ansible-project] replace module cannot crashes when encountering Danish characters

2019-03-19 Thread 'Mark Tovey' via Ansible Project
I am working on a playbook to replace the comment field in a server's password file. I was trying to use the replace module to do this. But it began crashing on one server. By elimination I was able to isolate the problem to one user's account entry in the password file. The user is

[ansible-project] How to print message at end of playbook without using debug?

2019-03-19 Thread Robert F
Is there a good way to display instructional information after a playbook ends without using the "debug" directive? I don't like using debug because the output is printed in red and so it makes it look at though my playbook has failed. I've tried something like the following but Ansible only

[ansible-project] Re: Utilizing win_iis_webbinding to update IIS certs

2019-03-19 Thread Igor Turovsky
Hello, Sorry for replying for very old thread, but I see exactly the same issue with xWebsite. Did you find the cause for it? Thank you, - Igor суббота, 18 ноября 2017 г., 4:25:43 UTC+3 пользователь Jordan Borean написал: > > That's weird I was able to get this task working in an optional

[ansible-project] Problem with the RedHat's VDO module

2019-03-19 Thread William Muriithi
Morning, I am seeing this error and wonder if someone have seen a similar error with this module or would know what could be the problem. These are the particulars of this problem: [william@ansible ~]$ rpm -qa | grep ansible ansible-2.7.8-1.el7.noarch [william@ansible ~]$ Task: - name:

Re: [ansible-project] ansible fail to work with ssh

2019-03-19 Thread Amit Bhardwaj
Check this link -> https://www.reddit.com/r/ansible/comments/3wetnm/i_can_ssh_why_cant_i_ansible/ and see if that works. In case it fails, we would like to know more about the setup like Ansible version, OS details on Ansible server and client, does it work fine with any other client or is it the

Re: [ansible-project] ansible fail to work with ssh

2019-03-19 Thread tharanga2006
I can do ssh to second server without issue with the same user but I'm getting this error when I ran the ansible command On Tuesday, March 19, 2019 at 10:03:04 AM UTC, tharan...@gmail.com wrote: > > Hi Amit, > Thanks as I mention in my problem > if I gave value for "ansible_ssh_pass= it works ,

Re: [ansible-project] ansible fail to work with ssh

2019-03-19 Thread tharanga2006
Hi Amit, Thanks as I mention in my problem if I gave value for "ansible_ssh_pass= it works , But I don't like to do that. On Tuesday, March 19, 2019 at 9:49:31 AM UTC, Amit Bhardwaj wrote: > > Check if this link helps: > https://stackoverflow.com/questions/42421774/ansible-permission-problems

Re: [ansible-project] ansible fail to work with ssh

2019-03-19 Thread Amit Bhardwaj
Check if this link helps: https://stackoverflow.com/questions/42421774/ansible-permission-problems Surely some permission issue here. On Tuesday, March 19, 2019 at 3:14:38 PM UTC+5:30, tharan...@gmail.com wrote: > > > Is this the same user you use for normal ssh? > yes. > > On Tuesday,

Re: [ansible-project] Jinja2 to filter paths

2019-03-19 Thread Sabiul Islam
On Thursday, March 14, 2019 at 7:39:47 PM UTC+6, Kai Stian Olstad wrote: > > On 14.03.2019 14:12, Ashok wrote: > > Hi, > > > > I've random paths like: > > > > /logs/other/dyn.log > > /logs/mx/mail.log > > /logs/apache-servers/other.log > > /logs/network/nas01.log > >

Re: [ansible-project] ansible fail to work with ssh

2019-03-19 Thread tharanga2006
Is this the same user you use for normal ssh? yes. On Tuesday, March 19, 2019 at 9:25:55 AM UTC, Sebastian Meyer wrote: > > On 19.03.19 09:18, tharan...@gmail.com wrote: > >ansible_user= host= > > Is this the same user you use for normal ssh? When you did the > ssh-copy-id you

Re: [ansible-project] ansible fail to work with ssh

2019-03-19 Thread tharanga2006
Hi, step five is to point my inventory ( point my hosts file ) Im using sudo because without it Im getting this error | FAILED! => { "msg": "Cannot write to ControlPath /home/blackbeard/.ansible/cp" } On Tuesday, March 19, 2019 at 9:11:25 AM UTC, Sudheer Satyanarayana wrote: > > > On

Re: [ansible-project] ansible fail to work with ssh

2019-03-19 Thread Sebastian Meyer
On 19.03.19 09:18, tharanga2...@gmail.com wrote: >ansible_user= host= Is this the same user you use for normal ssh? When you did the ssh-copy-id you transferred the public key to the remote node only for a single user (I'm guessing root, as you were root on the control node and did not

Re: [ansible-project] ansible fail to work with ssh

2019-03-19 Thread Sudheer Satyanarayana
On 19/03/19 1:48 PM, tharanga2...@gmail.com wrote: OS : Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-104-generic x86_64) ansible : ansible 2.7.8 Problem I need to configure ansible to run another node without entering the password ( through ssh) I have followed below method to setup the ssh with no

[ansible-project] Re: ansible fail to work with ssh

2019-03-19 Thread tharanga2006
any support highly appreciate On Tuesday, March 19, 2019 at 8:18:55 AM UTC, tharan...@gmail.com wrote: > > OS : Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-104-generic x86_64) > ansible : ansible 2.7.8 > > Problem > I need to configure ansible to run another node without entering the > password (

[ansible-project] Ansible expect module gives error message (UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh:) for JAVA 8and JAVA9. However, it works with Java7

2019-03-19 Thread Ashutosh Srivastava
Hi Guys, I have the requirement to make ansible expect module work for the installation of a third party application which workes only on JAVA8 or JAVA9. Here , the below snippet code that i have written *works with JAVA7 (EXPECT module runs but application installation fails as it needs

[ansible-project] ansible fail to work with ssh

2019-03-19 Thread tharanga2006
OS : Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-104-generic x86_64) ansible : ansible 2.7.8 Problem I need to configure ansible to run another node without entering the password ( through ssh) I have followed below method to setup the ssh with no password 1. I'm login to the control node

Re: [ansible-project] convert yaml file into jinja

2019-03-19 Thread Sebastian Meyer
On 19.03.19 03:27, federico montaldo wrote: > Hi Folks: > > I want to know if there is a way to extract from a yaml file the disk > information in order to pass it into jinja2 template. I got the following: You can access ansible_facts in a jinja2 template like you would in a playbook: {{

[ansible-project] Re: Check existence and state of a service on windows machine using win_service

2019-03-19 Thread CORLEONE##
On Thursday, March 17, 2016 at 4:54:59 PM UTC+5:30, ishan jain wrote: > > Both get-service and sc.exe returns textual results. I will have to match > strings to check if service exists and its state and i never like to base > my conditions on pattern matching. > The best solution i could