[ansible-project] Multiple choice question? Ansible

2021-06-16 Thread Krishna Gupta
Question: Ansible variable names may contain which of the following? Choose all that apply a: letters b: underscores c: numbers d: hyphens -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving ema

[ansible-project] Multiple Choice Question? Ansible

2021-06-16 Thread Krishna Gupta
Question: What module allows you to output information on the ansible control node during playbook execution? a: stdout b: echo c: debug d: print -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiv

[ansible-project] Multiple choice question? Ansible

2021-06-16 Thread Krishna Gupta
Which of the following are valid parameters of the template module? (Choose all that apply) a: state b: dest c: validate d: name -- 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 i

Re: [ansible-project] Re: Execute playbook on multiple users in the same host

2021-06-10 Thread Krishna P
Hi Brian, I just tried once again and am now able to connect all the hosts but getting below error. I have created group variables for each user but it's not working when I execute the playbook. can you please suggest to me how I can achieve this? *Error Screenshot:* TASK [t24-app : Download R21

Re: [ansible-project] Re: Execute playbook on multiple users in the same host

2021-06-09 Thread Krishna P
Hi Brian, Thanks, I tried the same and got the below error when I executed the playbook. *Error Screenshot:* [image: image.png] I am able to login all users from an ansible control machine using ssh passwordless authentication. [image: image.png] I have created a group level variable for each ch

[ansible-project] Re: Execute playbook on multiple users in the same host

2021-06-09 Thread Krishna P
HI, small correction in the previous email, Playbook is executing in app3 alone and it's ignoring other 2 On Wednesday, June 9, 2021 at 7:17:19 PM UTC+5:30 Krishna P wrote: > Hi, > > can anyone help me, how to execute ansible playbook on multiple users in > the same host. &

[ansible-project] Execute playbook on multiple users in the same host

2021-06-09 Thread Krishna P
Hi, can anyone help me, how to execute ansible playbook on multiple users in the same host. fine the below my inventory file and playbook: Note: it will execute only app2 if i execute the below playbook but i want to execute the playbook on all users *Playbook:* --- - hosts: Environment role

[ansible-project] Ansible playbook disk space csv report problem

2021-04-27 Thread krishna gupta
Dear All, I am executing the df -kh command saving the result in csv but result is not coming in proper csv format. Playbook --- - name: Generate the disk spacke in csvormat hosts: all tasks: - name: disk space shell: "df -kh" register: shell_output - se

[ansible-project] Re: variables in group_vars and host_vars do not load when using inventory directory

2020-05-01 Thread Navya Krishna Dobbala
Is your issue solved ? On Tuesday, 25 September 2018 02:04:48 UTC+5:30, myprogra...@gmail.com wrote: > > > A playbook I ran, returned this failure: > TASK [create-admin-user : Create the non-root user account] > > fatal: [415.791.30.131]: FAILED! => {"msg": "The task include

[ansible-project] Ansible having an issue when we pass dictionary as extra variable or define in the variable file

2019-04-09 Thread Krishna G
*Local Machine:* Ansible version: 2.4.1.0 python version = 2.7.10 *Remote Redhat Machine:* Ansible version: 2.7.7 Python: 2.7.5 i have ansible running on my local machine(MAC), when i pass extra varibale as map it's reading all the values in the map and giving proper results. If i run same ta

[ansible-project] Ansible having an issue while passing extra variable in map.

2019-04-09 Thread Krishna G
*Local Machine:* Ansible version: 2.4.1.0 python version = 2.7.10 *Remote Redhat Machine:* Ansible version: 2.7.7 Python: 2.7.5 i have ansible running on my local machine(MAC), when i pass extra varibale as map it's reading all the values in the map and giving proper results. If i run same ta

[ansible-project] Re: regex_replace filter

2019-04-06 Thread Sri Krishna G
Please ignore this issue. It was a mistake in the next part of the play book that is causing the port to come twice. On Sunday, April 7, 2019 at 1:03:34 AM UTC+5:30, Sri Krishna G wrote: > > I have a list of strings like : > > [hosts] > 10.100.0.1 > 10.100.0.2 > 10.100.0

[ansible-project] regex_replace filter

2019-04-06 Thread Sri Krishna G
I have a list of strings like : [hosts] 10.100.0.1 10.100.0.2 10.100.0.3 I am following the example under : https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html to "add "https://"; prefix to each item in a list" In my case I am appending the port number at the end of every

[ansible-project] Issue with local_action copy content

2018-11-19 Thread Vamsi Krishna
HI All, I am developing below play for patching but stuck with local action copy content module. Please let me know what I am missing here Code:- --- - hosts: "{{ host }}" become: yes become_method: sudo tasks: - name: Running prepatch info commands shell: | echo -e "\nun

[ansible-project] gcp_compute plugin showing auth failure

2018-11-05 Thread Murali Krishna
SUMMARY I am using gcp_compute plugin as a inventory source. While on local machine it is working fine but when I try to use this same inventory on GCP VM it is showing ansible-inventory -i ./inventory/gcompute.gcp.yaml --graph [WARNING]: * Failed to parse /inventory/gcompute.gcp.yaml with g

[ansible-project] Re: Ansible netconf is not working with Cisco IOS

2018-10-27 Thread Krishna Kotha
Need help on this On Friday, October 26, 2018 at 11:40:01 AM UTC-7, Krishna Kotha wrote: > > Hello, > > I am trying to use Netconf_config model on Cisco switch catalyst 9300. > I am getting following error message. > > You can see the playbook and the running the p

[ansible-project] Ansible netconf is not working with Cisco IOS

2018-10-26 Thread Krishna Kotha
Hello, I am trying to use Netconf_config model on Cisco switch catalyst 9300. I am getting following error message. You can see the playbook and the running the palybook. I tried with different options like changing the RPC, indentation and changing the XML to content in playbook. But nothing w

Re: [ansible-project] Got an error using shell module in playbook, 'Could not find or access to "path/to/the/shell/script"

2018-10-01 Thread krishna chaithanya inedi
not then > remote_src needs same spacing. > > On Mon, Oct 1, 2018 at 11:39 AM krishna chaithanya inedi < > chaithuinedi...@gmail.com> wrote: > >> >> # run a script using a executable system path >> - script: /extra/pki/Ansible/staging/lib/executable.sh >

Re: [ansible-project] Got an error using shell module in playbook, 'Could not find or access to "path/to/the/shell/script"

2018-10-01 Thread krishna chaithanya inedi
# run a script using a executable system path - script: /extra/pki/Ansible/staging/lib/executable.sh args: executable: shell remote_src: yes ... On Mon, Oct 1, 2018 at 11:34 AM Jonathan Lozada De La Matta < jloza...@redhat.com> wrote: > can you provide the tasks? > > On Mon, Oct 1, 2018 at 1

[ansible-project] Ansible Support for IBM AIX Platform

2018-09-27 Thread Sairam Krishna Lakkoju
Hey, Looking for pointers if ansible has support for AIX platform -- 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 email to ansible-project+unsubscr...@googlegroups.com

Re: [ansible-project] Ansible Jinja Template Comparison

2018-09-26 Thread Krishna N
Any help is highly appreciated! On Tue, Sep 18, 2018 at 11:54 AM Krishna N wrote: > Hi Jason, > Thanks for replying. That's definitely another way of doing it. However, > this is what I am trying. > > 1. Get the ntp server config from "sh run". > 2. Store t

Re: [ansible-project] Ansible Jinja Template Comparison

2018-09-18 Thread Krishna N
ore. Let me know if you still have issues after trying this. > > > > On Mon, Sep 17, 2018 at 5:40 PM Krishna N wrote: > >> Greetings! >> >> How to compare when items are not in jinja template loop? >> >> with_items: "{{ runconfser.stdout_lines[0]

[ansible-project] Ansible Jinja Template Comparison

2018-09-17 Thread Krishna N
Greetings! How to compare when items are not in jinja template loop? with_items: "{{ runconfser.stdout_lines[0] }}" when: (item not in {src: 'ntprequired.j2'} and (item!="")) ios_config: lines: - "no {{ item }}" I am using roles. */templates/ntprequired.j2*: {% for

Re: [ansible-project] Re: Jenkins - Ansible integration

2018-08-21 Thread Vamsi Krishna
HI All, Thanks for your suggestion. I am able to resolve this issue. I have installed publish over ssh plugin from which I am able to run ansible playbook directly PS:- My Jenkins and Ansible are on same server Regards Vamsi On Tuesday, August 21, 2018 at 12:04:33 AM UTC+5:30, Malcolm Hussa

Re: [ansible-project] Re: Jenkins - Ansible integration

2018-08-19 Thread Vamsi Krishna
kumar wrote: > > Hi vamsi, > Play book error says there is no create_user.yml file is present in > running directory . Check you are running from right directory . > > On Mon, 20 Aug 2018 at 10:59 AM, Vamsi Krishna > wrote: > >> HI Malcolm, >> >> Bel

[ansible-project] Re: Jenkins - Ansible integration

2018-08-19 Thread Vamsi Krishna
HI Malcolm, Below is the error I am facing. I have placed script in /home/ansible. I believe this job is running as Jenkins user. Please suggest Building on master in workspace /var/lib/jenkins/workspace/Ansible_create_user [Ansible_create_user] $ sshpass /usr/bin/ansible-playbook /h

[ansible-project] Jenkins - Ansible integration

2018-08-19 Thread Vamsi Krishna
HI All, I am newbie for both Ansible and Jenkins and I looking for step by step approach for running ansible playbook for Jenkins. >From Jenkins, I have installed Ansible plugin and in Global Tool Configuration I have set path as /usr/bin. I am trying to create free-style project by s

[ansible-project] Adding windows as client to Ansible server

2018-08-02 Thread Vamsi Krishna
HI All, Greetings ...! I am trying to setup Ansible environment and in that process I need to add windows client to my Ansible servers. I am getting below error and need your suggestions Environment:- Ansible server -- RHEL 7.5 Domain- no, local account Network -- 10.31.xx.xx Windows server

[ansible-project] How to avoid multiple login to the same device for multiple tasks?

2018-04-28 Thread Krishna N
* Question*: I have two tasks created, each requires a login credential for the device. When I run the playbook, it seems like the ansible has to login twice to the device (logs in, completes first task and logs out, login again, completes second task and logs out). This is making the operation

[ansible-project] How to parse ntp server IP using ansible for cisco IOS?

2018-03-10 Thread Krishna N
Hi everyone, Question: I am trying to parse ntp server ip from running-config of Cisco IOS device. What are the best methods to do that? The output should just be the IPs. My code: --- # Purpose: Provide credentials and find hard coded ntp server IP - hosts: ios_devices gather_facts: no c

Re: [ansible-project] Re: Permission denied while copy with sudo (Related to issue 2837)

2018-03-09 Thread Vamsi krishna
Hello @Toshio , Thanks for your response, i tried and i changed in the ansible.cfg file to remote_tmp: /var/tmp and still same error Yaml file i am using name: using hosts: all tasks: - name: creates directory file: path: /etc/ state: directory owner:

Re: [ansible-project] Re: Permission denied while copy with sudo (Related to issue 2837)

2018-03-08 Thread Vamsi krishna
When i am creating directory i am getting permission denied... ansible version 2.4.3 "msg": "There was an issue creating /etc/ as requested: [Errno 13] Permission denied: b'/etc/' On Thursday, March 8, 2018 at 5:03:59 PM UTC-8, Vamsi krishna wrote: > > Hi

Re: [ansible-project] Re: Permission denied while copy with sudo (Related to issue 2837)

2018-03-08 Thread Vamsi krishna
Hi vincent, mee to facing the same issue... changing the tmp directory means, what you mean?? you mean to change that in our hosts can u explain litttle bit clear... On Friday, July 19, 2013 at 9:30:53 AM UTC-7, Vincent Hardion wrote: > > I have just pull the last version but it is the sam

[ansible-project] how can i execute the following oracle sql commands using ansible and get the value back to be stored in variable

2018-02-28 Thread Gopi Krishna
HI, MY playbook: sample.sh: . /u05/oracle/VISEBS/12.1.0/VISEBS_sal-devtl10.env val='v$archived_log' R=`sqlplus '/as sysdba'< 0; exit; EOF` echo $R I am trying to achieve the same through ansible using shell command, but im getting the error - hosts: source tasks: - include_vars: sq

[ansible-project] Re: How to source a file which contains environment variables in a linux

2018-02-21 Thread Gopi Krishna
21, 2018 at 12:27:16 PM UTC+5:30, Gopi Krishna wrote: > > Hi All, > > - name: "source then env file" >shell: . /home/myfiles/setup.env > > I used . & source to source the env file, but its was not happening the > way that works in linux environement >

Re: [ansible-project] how to add new line character in copy module to write multiple lines

2018-02-20 Thread Gopi Krishna
That worked :)...! thanks Felix On Wednesday, February 21, 2018 at 12:20:26 PM UTC+5:30, Felix Fontein wrote: > > Hi, > > > I want to write few lines into a file using copy module by line by > > line but it's not happening, > > > > - name: "Storing the data details" > > copy: > >

[ansible-project] How to source a file which contains environment variables in a linux

2018-02-20 Thread Gopi Krishna
Hi All, - name: "source then env file" shell: . /home/myfiles/setup.env I used . & source to source the env file, but its was not happening the way that works in linux environement my setup.env: export ip_net=xx.xx.xx export home_net=xx.xx.xx expected: g...@xx.xx.xx.xx> . /home/myfiles/se

[ansible-project] how to add new line character in copy module to write multiple lines

2018-02-20 Thread Gopi Krishna
Hi All, I want to write few lines into a file using copy module by line by line but it's not happening, - name: "Storing the data details" copy: content: ' IP: xx.xx.xx.xx \n IPV4: xx.xx.xx.xx \n HOST_NAME: {{host_name}} \n

[ansible-project] synchronize not working between

2018-01-30 Thread Gopi Krishna
Hi all, synchronize command is not working. --- - hosts: target tasks: - name: "copy between two remote hosts" synchronize: src: /root/gopi/file_149 dest: /root/gopi/ #delegate_to: "{{ groups['oraclesource'][0] }}" delegate_to: "{

Re: [ansible-project] how to use dynamic calling of a variable which is present in vars file

2018-01-25 Thread Gopi Krishna
sure, thanks kai On Thursday, January 25, 2018 at 12:13:35 PM UTC+5:30, Kai Stian Olstad wrote: > > On 25.01.2018 06:44, Gopi Krishna wrote: > > Thanks, it worked, but where can i find these kind of descriptions in > > ansible. as the ansible doc's didn't hav

Re: [ansible-project] how to use dynamic calling of a variable which is present in vars file

2018-01-24 Thread Gopi Krishna
Hi Kai, Thanks, it worked, but where can i find these kind of descriptions in ansible. as the ansible doc's didn't have these kind of docs i guess. On Wednesday, January 24, 2018 at 5:30:34 PM UTC+5:30, Kai Stian Olstad wrote: > > On 24.01.2018 12:09, Gopi Krishna wrote:

[ansible-project] how to use dynamic calling of a variable which is present in vars file

2018-01-24 Thread Gopi Krishna
Hi All, My variable file: VISEBS_SYSTEM: password My yaml.file: I'll be passing a argument to my playbook as -e "src=VISEBS", in my playbook i am trying to get dynamically the VISEBS_SYSTEM value. any suggestions - include_vars: variable_file - debug: msg: "{{ '{{

[ansible-project] delegate_to hanging

2018-01-16 Thread Gopi Krishna
Hi, my playbook file: - hosts: oraclesource[0] tasks: - name: Copy Remote-To-Remote (from serverA to serverB) synchronize: src=/root/gopi dest=/root/gopi delegate_to: "{{groups['oraclesource'][1]}}" my hosts file: [oraclesource] xx.xx.xx.xx xx.xx.xx.xx while i'm running the abov

[ansible-project] Re: Delegate_to is throwing error "Failed to connect to the host via ssh"

2018-01-05 Thread Gopi Krishna
riday, January 5, 2018 at 1:46:59 PM UTC+5:30, Martyn Kempster wrote: > > I'm not sure totally how running an inventory dynamically with a [1] etc. > works. > > Have you tried running that last part with a - option? It looks like > its now got to the point where it k

[ansible-project] Re: Delegate_to is throwing error "Failed to connect to the host via ssh"

2018-01-04 Thread Gopi Krishna
** TASK [Gathering Facts] *** ok: [10.210.8.149] TASK [copy file from 147 to 149 from 141] this is where the program is being idle On Thursday, January 4, 20

[ansible-project] Re: Delegate_to is throwing error "Failed to connect to the host via ssh"

2018-01-04 Thread Gopi Krishna
7;][1] }}" not working how delegate it to the server 2 dynamically On Thursday, January 4, 2018 at 1:12:39 PM UTC+5:30, Gopi Krishna wrote: > > Hi, > > My hosts file: > > [ebs] > xx.xx.xx.xx > > [source] > xx.xx.xx.xx > > playbook: > > --- > -

[ansible-project] Re: Delegate_to is throwing error "Failed to connect to the host via ssh"

2018-01-04 Thread Gopi Krishna
But, in my case what can be the value for the delegate_to like: delegate_to: xx.xx.xx.xx # ip address ?? then it will became static . is there any option to provide like delegate_to: group2[1] ?? On Thursday, January 4, 2018 at 1:12:39 PM UTC+5:30, Gopi Krishna wrote: > > Hi, > &

[ansible-project] Delegate_to is throwing error "Failed to connect to the host via ssh"

2018-01-03 Thread Gopi Krishna
Hi, My hosts file: [ebs] xx.xx.xx.xx [source] xx.xx.xx.xx playbook: --- - hosts: source tasks: - name: "copy file from 147 to 149 from 141" synchronize: src: /root/gopi dest: /root/gopi delegate_to: ebs when im running this playb

[ansible-project] Re: how do I use ios_config to change configuration to default?

2017-05-08 Thread Rama Krishna
Use Jinja2 template with ios_config, and set the module parameter match: line, which will do the job as you seek. cheers On Wednesday, April 26, 2017 at 6:39:48 PM UTC+5:30, John Z wrote: > > How do I use ios_config to delete configuration but only if it is present? > I want ios_config to updat

[ansible-project] Invoke Jinja2 template in a custom module

2017-05-08 Thread Rama Krishna
Hi Fellas, I'm trying to invoke jinja2 template to a custom module, but it end up i get only a string of file name instead of calling ansible container to get the jinja2 output. On debug i see, when the default modules call jinja2 template it automatically parses, but on custom modules it's n

[ansible-project] Re: junos_command

2017-05-08 Thread Rama Krishna
Based on the error message, authentication parameters are not passed properly to the module. I see it's using netconf; so i think you have used connection method right.. Cheers On Wednesday, April 26, 2017 at 1:01:13 AM UTC+5:30, Asif Iqbal wrote: > > I am failing to make junos_command work

Re: [ansible-project] Automating Apache Karaf

2017-05-01 Thread Ram Krishna
Hello Richard, I understand it has been long time since you wrote this post. I need a similar solution for deploying karaf features, would appreciate if you can share your script. I could not find the git repo, would be grateful if you can share. Thanks, Ram On Saturday, 19 October 2013 06:1

[ansible-project] Is it possible to generate Inventory from CMDB (Configuration Management Database)

2016-06-13 Thread Raghava Krishna
I'am planning to generate dynamic inventory file from configuration management database system instead of writing in files. Is it possible to write a script,so that when i run ansible playbook it should pick up inventory from database. If it is successful then i have a plan of generating the v

[ansible-project] Netconf module for Ansible

2016-06-09 Thread K. Krishna
Hi, Is there a generic Netconf module support ? Is there any plan to add such as module ? Thanks, Krishna -- 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

[ansible-project] Re: Ansible WinRM shows 401 Unauthorized when pywinrm works with no problem

2016-05-13 Thread Krishna Chaitanya
Hi, I am facing same issue even after changing ansible_ssh_password to ansible_password. Facing issue with 401 unauthorized error for winrm connection. Need help On Friday, November 13, 2015 at 3:08:16 AM UTC+5:30, kevin@gmail.com wrote: > Try changing: > > ansible_ssh_password=ansibl

[ansible-project] ansible winrm 401 unauthorized

2016-05-13 Thread Krishna Chaitanya
I able to establish the connection to the target windows machine, but the winrm http is not accepting my credentials( i have quoted username and passwd in the windows.yml file). Need help in this. -- You received this message because you are subscribed to the Google Groups "Ansible Project"

[ansible-project] block in file with loop

2016-04-25 Thread bala krishna
Hi, I am trying to write ansible playbook for Nagios client installation and configuration. - name: untar Plugin Zip file to libexec directory command: mount | grep -v "rootLV" | grep ext4 | awk '{print $3}' register: dirlist - name: create Nagios Host ServiceConfig file blockinfil

[ansible-project] module lineinfile not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git submodule update --init --recursive' to correct this

2016-03-18 Thread Krishna Kanth
internet ditn seem to help. Any suggestions is greatly appreciated. Regards, Krishna -- 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 email to ansible-projec

[ansible-project] NameError: global name 'ssh_common_args' is not defined

2016-02-29 Thread Krishna Kishore Bonagiri
Hi, I recently installed Ansible from github and was trying to start with the ping command, "ansible all -m ping -vvv" but it is throwing this error. I could not find the reason, can someone please give a hint on why is it happening or how to fix this? Using /home/kbonagir/ansible/ansible/a

[ansible-project] configure VM IP along with vsphere_guest

2015-12-07 Thread Sri Krishna G
hi all, i am trying to see how to assign IP to a VM after it is created with the vsphere_guest module. i have gone through the pysphere SDK documentation, and i gather that it supports assigning an IP. has any one tried to get it to work? if this topic was already discussed please point me to t

Re: [ansible-project] Re: command module and --sudo

2015-06-22 Thread krishna Murthy
Thanks i found this post, was fighting with Ansible, checking there should be some option to run it plane with invoking $SHELL, now i got know its not possible, i will run it in command: with stdin password, pls let me know if this is fixed, means if there is an option to exclude shell. On

[ansible-project] FAILED => SSH Error: ssh: connect to host 127.0.0.1 port 2222: connection refused

2015-05-25 Thread vamsee krishna
Hi All, I'm new to Ansible. started working on Ansible basics. I installed Ubuntu 14.04 in virtual box and installed Ansible using the following commands $ sudo apt-get install software-properties-common$ sudo apt-add-repository ppa:ansible/ansible$ sudo apt-get update$ sudo apt-get install an

Re: [ansible-project] Re: Having variables in task names

2015-03-12 Thread Krishna
Except this fails to work even with global vars on 1.8.4 (but used to print the value with 1.7.x). --- - hosts: 127.0.0.1 gather_facts: no vars: vhost: "foo" tasks: - name: create a virtual host file for {{ vhost }} debug: msg="{{ vhost }}" Why