[ansible-project] Re: TimeOut

2019-11-15 Thread Soniya panwar
Hello Marc-antoine Desrochers, To avoid such kind of problems you can add -o ServerAliveInterval=NumberOfSeconds in "[ssh_connection]" from ansible.cfg. Add the following in your ansible.cfg: [ssh_connection] ssh_args = -o ServerAliveInterval=n Here, n is the ServerAliveInterval (seconds) whi

[ansible-project] Re: I have problems with de expect module

2019-10-02 Thread Soniya panwar
Hello Javier, You are getting this error because you have used response instead of responses in expect module parameters. Please use the below playbook: - name: installation scanner expect: command: /tmp/uld/install-scanner.sh responses: Question: - "Press E

[ansible-project] Re: customs list of paths for searching templates?

2019-09-17 Thread Soniya panwar
Hello Michael, As i understand your query you want to use custom list of jinja2 template paths. you can use fileglob module here to match all the files of a particular pattern in a directory. This module return a list of paths. Below is the example playbook: --- - hosts: localhost vars: f

[ansible-project] Re: What would be the checkpoint firewall ansible_network_os

2019-07-29 Thread Soniya panwar
Hello Tribhuvan Yadav ansible_network_os informs Ansible which Network platform the hosts corresponds to. This is required when using ansible_connection=network_cli. For network_cli connection methods the ansible_network_os variable must be set. This variable informs Ansible which network platfo

[ansible-project] Re: What would be the checkpoint firewall ansible_network_os

2019-07-29 Thread Soniya panwar
Hello Tribhuvan Yadav ansible_network_os informs Ansible which Network platform the hosts corresponds to. This is required when using ansible_connection=network_cli. For network_cli connection methods the ansible_network_os variable must be set. This variable informs Ansible which network pl

[ansible-project] Re: evaluating a variable value as boolean

2019-07-11 Thread Soniya panwar
Hello Shashank, This statement is getting failed because you didn't use double quotes (" ") in your command. The correct syntax to use this statement is: when: "{{happened}} | bool == true" Thanks Soniya On Thursday, July 11, 2019 at 6:04:32 PM UTC+5:30, Shashank Dutt Jha wrote: > > I have

[ansible-project] Re: "msg": "SSH Error: data could not be sent to remote host

2019-04-26 Thread Soniya panwar
Hello Pushparaj, The reason why you getting this error because you haven't spaecified a remote_user or ansible_user in ansible host file. As you haven't specified a remote_user or ansible_user it is attempting to use your local user (or ssh_config) and key based auth that may have specified in

[ansible-project] Re: win_copy error doesnt state what is the issue

2019-04-26 Thread Soniya panwar
Hello Eric Tan, Could you please run your playbook with - to see if there is any more exception information available and paste results here? Thanks Soniya On Tuesday, April 23, 2019 at 1:31:18 PM UTC+5:30, Eric Tan wrote: > > Hi all, > > I have followed the instructions on Ansible docs on

[ansible-project] Re: list containing any item of another list

2019-04-05 Thread Soniya panwar
Hello Adam E, You have got the implementation correct. Intersect is the correct method to be used. You may refer the playbook mentioned below: --- - hosts: localhost vars: list1: ['value1', 'value2] list2: ['value3', 'value4'] tasks: - name: intersrction debug:

[ansible-project] Re: list containing any item of another list

2019-04-05 Thread Soniya panwar
Hello Adam E, You have got the implementation correct. Intersect is the correct method to be used. You may refer the playbook mentioned below: - hosts: localhost vars: list1: ['value1', 'value2'] list2: ['value3', 'value4'] tasks: - name: Find intersection debug:

[ansible-project] Re: list containing any item of another list

2019-04-05 Thread Soniya panwar
You have got the implementation correct. Intersect is the correct method to be used. You may refer the playbook mentioned below: - hosts: localhost vars: list1: ['value1', 'value2'] list2: ['value3', 'value4'] tasks: - name: intersrction debug: msg: "{{ list1 |

[ansible-project] Re: Module yum: update revision

2019-04-04 Thread Soniya panwar
Hello Ricardo, You can not update the version to its latest revision using "state= latest". State "latest" will update the specified package if it's not of the latest available version. In your case, it will update your package to the latest available version which is "my-rpm1-1.3.0-1". To per

[ansible-project] Re: Ansible copy multiple files to multiple destinations ??

2017-12-20 Thread Soniya panwar
o only you as verbose output was too huge, please send me > alone your email if you haven't received it so I can send you as an > attachment. > > On Thursday, December 7, 2017 at 12:50:25 AM UTC-8, Soniya panwar wrote: >> >> Hello Love, >> >> >> It will

[ansible-project] Re: Ansible copy multiple files to multiple destinations ??

2017-12-07 Thread Soniya panwar
wrote: > > Hello Soniya, > > Thanks for your input, I see code executed successfully without errors but > files were not copied to desired destinations. > > > On Monday, November 27, 2017 at 8:51:44 PM UTC-8, Soniya panwar wrote: >> >> Hello, >> >> You

[ansible-project] Re: Ansible copy multiple files to multiple destinations ??

2017-11-27 Thread Soniya panwar
1 : ok=5changed=0unreachable=0failed=0 Thanks Soniya On Thursday, November 23, 2017 at 7:52:38 PM UTC+5:30, Love wrote: > > Hello Soniya, > > Yes, > > First I need to check if the directory exists or NOT & create it, works > perf

[ansible-project] Re: Wont be able to ping Windows Machines Via Linux Ansible Server

2017-11-22 Thread Soniya panwar
Hello, There could be a few things not correctly configured or missed that could result into below error: First and foremost, while installing Ansible, did you resolve dependencies for paramiko, PyYAML, Jinja2 and httplib2 packages? If not, you may execute below commands on the linux machine

[ansible-project] Re: Ansible playbook - pass variables to role with template

2017-11-21 Thread Soniya panwar
Hello, Your requirement is not clear enough. can you please elaborate more on what are you trying to achieve, >> if it's possible to pass variables from playbook to role which has template. if you wants to decide the template to use at run time, then you need not provide the complete path. Ins

[ansible-project] Re: Ansible playbook - pass variables to role with template

2017-11-21 Thread Soniya panwar
Hello, Your requirement is not clear enough. can you please elaborate more on what are you trying to achieve, >> if it's possible to pass variables from playbook to role which has template. if you wants to decide the template to use at run time, then you need not provide the complete path. Ins

[ansible-project] Re: Install Java using its source :: Ansible

2017-11-14 Thread Soniya panwar
> > Hello, > Above provided playbook will set the Classpath temporaily. If you wish to make the entry persistent, you will have to use below task in place of "setup the java class path" task: - name: setup the java Classpath permanently lineinfile: path: ~/.bashrc line: 'exp

[ansible-project] Re: Install Java using its source :: Ansible

2017-11-14 Thread Soniya panwar
Hello, >> I have 10 no.of redhat 7.2 servers and I want to install jdk-9.0.1_linux-x64_bin.tar.gz for all those servers and same time i wanna setup the java class path too. you can achieve this task by following these options: 1) First of all you have to do the entry of your 10 redhat server

[ansible-project] Re: Ansible copy multiple files to multiple destinations ??

2017-11-13 Thread Soniya panwar
Hello, Can you please elaborate your tasks more? 1. In first task: you are checking if the file is exist on destination server, and if not exist you will create new directory? 2. In second task: you are saying maven repo created but in this task you are coping your files src to destination. if

[ansible-project] Re: Get user details

2017-11-07 Thread Soniya panwar
hello, Yes, you can get available users or user details in system by using ansible playbooks. For this you need to use the command / win_command module. "The command module takes the command name followed by a list of space-delimited arguments and executes the given command on all selected nod

[ansible-project] Re: How to write cobbler.ini for multiple cobbler servers

2017-11-06 Thread Soniya panwar
Hello, You can easily add multiple cobbler servers in cobbler.ini file by creating a diffenrent tag for each cobbler server. Please refer to the below example: eg: [cobbler1] host = http://cobler1 cache_path = /tmp cache_max_age = 900 [cobbler2] host = http://cobbler2 cache_path = /tmp cache_

[ansible-project] Re: Create Vm from Dynamic Json Value

2017-10-31 Thread Soniya panwar
hello, Yes, this functionality can be implemented using the feature of dynamic inventory. Ansible can accept any kind of executable file as an inventory file, as long as you can pass it to Ansible as a JSON. You could create a script that can be run and will output JSON to stdout. Ansible w

[ansible-project] Re: list of variables in YAML inventory

2017-10-23 Thread Soniya panwar
Hello Bundy, You may use a regular text file for each host to contain the dynamically created list you wish to iterate over. This text file can then be consumed in playbook using the lookup plugin. Lookup plugins allow accessing data in Ansible from the filesystem. Below is the sample example

[ansible-project] Re: ansible

2017-10-23 Thread Soniya panwar
Hello The reason for the failure is that the playbook is not able to retrieve the credentials for Ubuntu user to become root. In order to resolve this you will have to use --ask-sudo-pass suffix everytime you execute an ansible-palybook command. Else you may make an entry in ansible.cfg

[ansible-project] Re: add_host in ansible

2017-10-05 Thread Soniya panwar
hello, The add_host module makes use of variables to create an in-memory inventory of new hosts and groups that can be used in subsequent plays within the same playbook. Normally Ansible requires an inventory file to be created to know which machines it is meant to operate on. This is typicall

[ansible-project] Re: Syntax for role dependencies in meta/main.yml?

2017-10-04 Thread Soniya panwar
>> What is the syntax for role dependencies in the role's meta/main.yml file? You can use this syntax for the same: meta/main.yml --- dependencies: -{role: some_repo, src:git+ssh://git@path/some_repo} On Tuesday, October 3, 2017 at 1:51:08 AM UTC+5:30, ZillaYT wrote: > > I'm playing with

Re: [ansible-project] Re: need to install ansible on my solaris 11,can any1 suggest me plz

2017-09-27 Thread Soniya panwar
can you please tell where exactly you stucked? On Wednesday, September 27, 2017 at 3:07:31 PM UTC+5:30, adnnan mohammed wrote: > > Thanks indeed for your help,but i have already tried this but i am still > stuck but big thanks. > > Br > > On Wed, Sep 27, 2017 at 12:27 PM, S

[ansible-project] Re: need to install ansible on my solaris 11,can any1 suggest me plz

2017-09-27 Thread Soniya panwar
Hello, please find the steps to install ansible on solaris 11.2 Step:1 install gcc pkg install gcc Step:2 install pip curl https://bootstrap.pypa.io/get-pip.py | python - Step:3 patch the python Makefile to remove KPIC option (use by studio compiler) perl -i.org -pe 's/-KPIC//' /usr/lib/python2

[ansible-project] Re: need to install ansible on my solaris 11,can any1 suggest me plz

2017-09-27 Thread Soniya panwar
Hello, Please find the links for the related content: http://docs.ansible.com/ansible/latest/intro_installation.html#latest-releases-via-opencsw-solaris https://blogs.oracle.com/scottdickson/installing-ansible-on-solaris-113 Thanks On Wednesday, September 27, 2017 at 2:21:45 PM UTC+5:30, adnna

[ansible-project] Re: Setup module filter question

2017-09-26 Thread Soniya panwar
Hello, As the filter option filters only the first level key of ansible_facts. if you want to get it by adhoc command only then you can try this command to get a bit similar result: *ansible myhost -m setup -a filter="ansible_default_ipv4"* On Tuesday, September 26, 2017 at 10:28:47 PM UTC+5

[ansible-project] Re: Delpoying windows application from jenkins running on windows

2017-09-26 Thread Soniya panwar
Hello, *>> Since the ansible control needs linux im wondering if i can run playbooks remotely from jenkins.* ansible playbooks can run on both linux and windows. you can run playbooks remotely from jenkins to linux. You have to do add plugins and so some settings to achieve this, here some link

[ansible-project] Re: list of variables in YAML inventory

2017-09-25 Thread Soniya panwar
Hello, You can use "Lookup plugin" for this. Example: --- - hosts: host1 vars: contents: "*{{* lookup*(*'file'*,* '/etc/host1.txt'*)* *}}*" host2 vars: contents: "*{{* lookup*(*'file'*,* '/etc/host2.txt'*)* *}}*" Thanks On Friday, September

[ansible-project] Re: Need Python API 2.0 fully explained documents

2017-09-25 Thread Soniya panwar
hello, for python api 2.0.documentation go through this link: http://docs.ansible.com/ansible/latest/dev_guide/developing_api.html#detailed-api-example thanks On Friday, September 1, 2017 at 11:41:14 AM UTC+5:30, Manish Chaturvedi wrote: > > Hi Team, > > I am new for Ansible. I don't want to e

[ansible-project] Re: Ansible docker integration

2017-09-24 Thread Soniya panwar
Hello you can go through these documentation for the same: http://docs.ansible.com/ansible/latest/docker_module.html http://docs.ansible.com/ansible/latest/docker_container_module.html#docker-container http://docs.ansible.com/ansible/latest/docker_image_module.html#docker-image https://www

Re: [ansible-project] Re: How can Integrate Ansible Tower with Active Directory

2017-09-21 Thread Soniya panwar
gt; > > > > On Thu, Sep 21, 2017 at 12:11 PM, Soniya panwar > wrote: > >> >> Hello >> >> To integrate Ansible tower version 3.1.5 with LDAP you can follow this >> link: >> >> http://docs.ansible.com/ansible-tower/latest/html/administrati

[ansible-project] Re: How to update or add string at the end of a line

2017-09-21 Thread Soniya panwar
Hello >>Below is what I need to achieve i think you forgot to give your requirements. if you can provide what exactly you need it will be easy to answer. you can use blockinfile module if you want to insert/update/remove a block of lines in a file, for more understanding please follow this link

[ansible-project] Re: ansible

2017-09-21 Thread Soniya panwar
Hello it is failing because of the password, to solve this problem please follow these steps: Add these lines in ansible.cfg file: [defaults] sudo_user = root ask_pass = True After saving this file export ask sudo password export ANSIBLE_ASK_SUDO_PASS=true On Tu

[ansible-project] Re: How can Integrate Ansible Tower with Active Directory

2017-09-20 Thread Soniya panwar
Hello To integrate Ansible tower version 3.1.5 with LDAP you can follow this link: http://docs.ansible.com/ansible-tower/latest/html/administration/ldap_auth.html On Tuesday, September 19, 2017 at 12:03:21 PM UTC+5:30, Nuwan Vithanage wrote: > > *HOW CAN I INTEGRATING ANSIBLE TOWER WITH LDAP

[ansible-project] Re: Ansible vars_prompt value in menu

2017-09-15 Thread Soniya panwar
Hello, you can use python script to map these host variables else you can directly ask user to give input as Test01. Thanks Soniya On Friday, September 15, 2017 at 11:52:47 AM UTC+5:30, vsslava one wrote: > > I have playbook > > - hosts: "{{ host }}" > connection: paramiko > gather_facts: n

[ansible-project] Re: Neatest way to automate role installation

2017-09-13 Thread Soniya panwar
>> Is that by using the shell/command module and then 'ansible-galaxy install' yes, you can use this method. Another method you can use is this: you can use src which is the source of the role. Use the format username.role_name, if downloading from Galaxy or if you want to download the role

[ansible-project] Ansible Tower

2017-09-11 Thread Soniya panwar
Can you please help me about these feature of Ansible Tower: 1) Can Ansible tower automatically upgrade any software when the latest version has come over a period?. 2) Can Ansible tower do monitoring like Zabbix do? -- You received this message because you are subscribed to the

[ansible-project] Re: Advice needs for Ansible Tower Installation

2017-09-06 Thread Soniya panwar
>> When I install ansible tower Do i need to install ansible 1st ? yes as per documentations, With Ansible Tower version 2.3.0, Ansible is installed automatically during the setup process.. you can follow this link for more details: http://docs.ansible.com/ansible-tower/latest/html/quickinstall

[ansible-project] Re: I want to copy my python script which depends on my other python packages to remote node and run this scripts, is it possible?

2017-09-06 Thread Soniya panwar
yes, you can copy your script and other packages to remote nodes and run this script. >>I want to copy my python script which depends on my other python packages to remote node and run this scripts >>I want to copy my python script which depends on my other python packages to remote node You c

[ansible-project] Re: install help from source

2017-09-05 Thread Soniya panwar
>>I can't seem to find out the exact process of installing it in a different path other then /usr/local/bin (I guess it is the default? ) yes, you can install this from different path. you can give the directory path while cloning the code. you can follow these steps: step:1 yum install make g

Re: [ansible-project] Linux command inside ansible playbook

2017-08-28 Thread Soniya panwar
Hey, this error seems to generic, can you please provide more on this error? On Monday, August 28, 2017 at 2:40:18 PM UTC+5:30, Tcpip wrote: > > In the script I added the full path of both files and know i get this error > > fatal: [SW1]: FAILED! => {"changed": true, "failed": true, "rc": 1, > "s

[ansible-project] Re: Linux command inside ansible playbook

2017-08-27 Thread Soniya panwar
you can use command module or shell module to execute any linux command inside a playbook. for more details you can go through these links: http://docs.ansible.com/ansible/latest/command_module.html http://docs.ansible.com/ansible/latest/shell_module.html

[ansible-project] Re: Parsing log files with timestamp Ansible

2017-08-24 Thread Soniya panwar
24, 2017 at 10:20:51 PM UTC+5:30, SARANYA devotional R wrote: > > I want to find the recently created file under a folder and cat to the > file for the contents updates which can be visible while running a play in > output. > > On Wednesday, 23 August 2017 03:29:19 UTC-4, Soniya

[ansible-project] Re: nesting of inventory file and include mechanisms

2017-08-24 Thread Soniya panwar
ith > writing a python code to do that. > > On Thursday, August 24, 2017 at 9:31:42 AM UTC-4, Soniya panwar wrote: >> >> hello, >> it will be easy to understand if you elaborate what exactly error you >> are getting. >> >> >> >> playbooks

[ansible-project] Re: nesting of inventory file and include mechanisms

2017-08-24 Thread Soniya panwar
wrote: > > Thank you Soniya for you time and pointer. > > I tried this, but I am not able to make it work for inventory. > > playbooks it works but for inventory, I am not sure how to do it > > -N > > On Wednesday, August 23, 2017 at 12:51:22 AM UTC-4, Soniya panwar

[ansible-project] Re: add user via adhoc

2017-08-24 Thread Soniya panwar
hey, the problem may be is in your password generation, may be your user has been created without password you can check that by these commands: user has been created but without password: # id test uid=229(test) gid=1(test) # grep -q test /etc/security/passwd && echo "password OK" || echo "NO p

[ansible-project] Re: add user via adhoc

2017-08-24 Thread Soniya panwar
how r u verifying that user is created or not? can you please share your command from which you are verifying and also the output of # grep test /etc/passwd. On Thursday, August 24, 2017 at 2:25:14 PM UTC+5:30, Tcpip wrote: > > Hello, > Yes the logs says that but when I check the remote server

[ansible-project] Re: add user via adhoc

2017-08-24 Thread Soniya panwar
These logs shows that your user is created successfully. if you are not able to check the user whether it is created or not than you can see the output of this command # grep test /etc/passwd output of this command should be like this: test:x:1001:1001::/home/test: And if any query please reve

[ansible-project] Re: add user via adhoc

2017-08-23 Thread Soniya panwar
Hey Tcpip, Can you please elaborate what exactly error you are getting after running this command because its working fine for me. You need to provide more info like - the env (os, distro, version, etc) you are running ansible from - the full output (with the verbosity level raised by adding t

[ansible-project] Re: Referencing roles within a module?

2017-08-23 Thread Soniya panwar
yes, you are doing this in right way, you can call role directly or you can parameterize the roles: Example: --- - hosts: localhost roles: - casl-ansible/roles/oc-apply - { role: casl-ansible/roles/oc-apply } or if you wants to use any condition or variable to execute your role then you

Re: [ansible-project] Ansible role dependcies/requirements.yml

2017-08-23 Thread Soniya panwar
>>Can we add post tasks(playbooks from subversion) somehow inside roles? Or >>place post tasks in top level dirctory to be used by all roles somehow? Yes, we can do that by defining dependency in main.yml in meta directory. Example: #meta/main.yml Dependencies: - ansiblr-role -- You received

[ansible-project] Re: Parsing log files with timestamp Ansible

2017-08-23 Thread Soniya panwar
you can use lineinfile module for this. for more understanding on lineinfile module you can go through to the link " http://docs.ansible.com/ansible/latest/lineinfile_module.html"; if anything specific is required please elaborate in details. On Tuesday, August 22, 2017 at 9:10:13 PM UTC+5:30, S

[ansible-project] Re: nesting of inventory file and include mechanisms

2017-08-22 Thread Soniya panwar
yes you can consider this. but you have to give the full path while including the file otherwise it may give error: example: pcb.yml file --- - include: /the_env/ce/apa.yml On Wednesday, August 23, 2017 at 8:06:20 AM UTC+5:30, Narahari 'n' Savitha wrote: > > Friends: > > This is my first p

[ansible-project] Re: Ansible role dependcies/requirements.yml

2017-08-22 Thread Soniya panwar
you can add pretask and post task within your master playbook: --- - hosts: groupA pre_tasks: -name: roles: - main-role/groupa-status-check post_tasks: -name: . you can also go through this page: " http://docs.ansible.com/ansible/latest/playbooks_roles.html"; for more info

[ansible-project] Re: Non Standard SSH Login

2017-08-22 Thread Soniya panwar
ys ask > User ID and Password via ssh. It appears that they do not implement the > full ssh features in their products. > > Any other ideas on how to get ansible to do a "screen scrape/expect" on > the login process? > > Thanks in advance > > > On Tuesday,

[ansible-project] Re: Non Standard SSH Login

2017-08-22 Thread Soniya panwar
>>Any other ideas on how to get ansible to do a "screen scrape/expect" on the login process? Yes, you can use expect module. You could just run it on local host and use the ssh as the command. Example: - host: localhost connection: local tasks: - expect: command: ssh

[ansible-project] Re: Non Standard SSH Login

2017-08-22 Thread Soniya panwar
ys ask > User ID and Password via ssh. It appears that they do not implement the > full ssh features in their products. > > Any other ideas on how to get ansible to do a "screen scrape/expect" on > the login process? > > Thanks in advance > > > On Tuesday,

[ansible-project] Re: suggest me the steps for clearing the hadoop YARN Cache using Ansible

2017-08-18 Thread Soniya panwar
Hello bibhu patnaik , you can use this Ansible playbook to execute your tasks. - name: service hadoop-mapreduce-historyserver stop service: name: hadoop-mapreduce-historyserver state: stopped - name: service hadoop-yarn-resourcemanager stop service: name: hadoop-yarn-resourcema

[ansible-project] Re: Non Standard SSH Login

2017-08-15 Thread Soniya panwar
You can follow these step to make machine passwordless. Step:1 First generate the public/private key pair on the Ansible control machine: $ ssh-keygen –t rsa Step:2 Enable the RSA-SSH authentication feature on the Dell switch by executing the following command: # ip ssh rsa-authentication enabl

Re: [ansible-project] Re: Not able to ping windows machine through Ansible (winrm using credential option as CredSSP is being used)

2017-08-04 Thread Soniya panwar
x27;:' in your variable ansible_port:=5985, is this a > typo ? and make sure the variables are applied to the task/play > > > > On Fri, Aug 4, 2017 at 1:02 PM, Soniya panwar > wrote: > > Thanks for the reply, > > i applied all these thing but not able to solve my

[ansible-project] Re: Not able to ping windows machine through Ansible (winrm using credential option as CredSSP is being used)

2017-08-03 Thread Soniya panwar
Thanks for the reply, i applied all these thing but not able to solve my problem. please look into the logs also and provide the possible solution: 2017-08-04 10:19:54,570 urllib3.connectionpool Starting new HTTPS connection (1): X.X.X.X 2017-08-04 10:19:54,598 urllib3.connectionpool https://X.X

[ansible-project] Not able to ping windows machine through Ansible (winrm using credential option as CredSSP is being used)

2017-07-31 Thread Soniya panwar
Hi I am running ansible 2.3.1.0 on centos7. The host(windows) machine is windows 8 with powershell. I have installed pywinrm[credssp] (Authentication method credSSP is being used) on centos and included windows hostnames in the inventory file. Below are the settings in group variables file: an