[ansible-project] Passing parameters to custom module

2016-04-26 Thread Mona Gopal
Hi, I have written custom modules in python. I am calling the modules from my task file like below: - name: Collect logstash details action: get_logstash_details *path*={{ logstash_path }} register: result - name: Display the logstash details debug: var=result get_logstash_details is my

[ansible-project] Ansible_facts

2016-05-17 Thread Mona Gopal
Hi, I am writing an inventory playbook to fetch the system information such as CPU details, Network Related info, Disk space related info and system specific information. Ansible already provides some of these info that i need in the setup module. I want to customize it or rather fetch specific

[ansible-project] Re: ansible_facts access within a custom module

2016-05-17 Thread Mona Gopal
Hi, import exceptions import subprocess from ansible.module_utils.basic import * def main(): module = AnsibleModule(argument_spec = dict(data=dict(required=False, default=None),),supports_check_mode = True) dt = {"System_Details":{'Kernel_version':ansible_hostname}} module.exit_jso

[ansible-project] Using make to install

2016-05-24 Thread Mona Gopal
Hello, I am trying to install perl module for nagiosgraph-1.5.2 with ansible which can be installed manually with three steps 1> perl Makefile.PL 2> gmake 3> gmake install afetr 3> gmake install nagiosgraph asking to confirm path where its getting installed. manually we keep pressing

[ansible-project] Unable to change user for play

2016-06-09 Thread Mona Gopal
Hi, Oam.yml - name: apply common configuration to all nodes hosts: all # user: root become: yes become_user: sudo become_method: sudo vars_files: - dependency_list.yml - client_dependency_list.yml roles: - { role: server, when: server_or_client_installat

[ansible-project] Lineinfile append at EOF

2016-06-13 Thread Mona Gopal
Hi all, I am trying to use the lineinfile module to append some of the software details to a file. I don't want to match to any regexp, but just insert every software details at the EOF. Below is the piece of code. - name: Collect python details action: get_python_details register: pyt

[ansible-project] Re: Lineinfile append at EOF

2016-06-13 Thread Mona Gopal
details to file local_action: lineinfile dest={{ third_party_dest_path }} *line="{{ redis }}"* state=present create=yes On Tuesday, June 14, 2016 at 10:36:33 AM UTC+5:30, Mona Gopal wrote: > > Hi all, > > I am trying to use the lineinfile module to append some of the so

[ansible-project] Ansible-Python Dependencey

2016-07-27 Thread Mona Gopal
Dear All, I have a playbook written to fetch various type of inventory information. This playbook gives the following error when i try to run in on a server with RHEL5.5 Python2.4.3 -- You received this message because you are subscribed to the Google Groups "Ansible Project" gr

[ansible-project] Ansible-Python Dependency

2016-07-27 Thread Mona Gopal
Dear All, I have a playbook written to fetch various type of inventory information. This playbook gives the following error when i try to run in on RHEL5.5 server with Python2.4.3 in it Error: fatal: [172.19.1.156]: FAILED! => {"changed": false, "failed": true, "msg": "Error: ans

[ansible-project] Storing Arrays in variable

2016-07-27 Thread Mona Gopal
Dear All, I have a file with the below content: ## NexGen SS7 maximum allowed configuration file MAXIMUM_INSTANCES = 2 MAXIMUM_LINKS = 0 MTP2 = NO SCTP = YES M2UA = NO MTP3 = NO M3UA = YES SCCP = YES TCAP = YES *MAC = 441ea15e6f44,441ea15e6f46,441ea15e4ff8,441ea15e4ffa* LIC-START-TIME = 00/00/

[ansible-project] Ansible Privilege Escalation

2015-07-15 Thread Mona Gopal
Hello Everyone, Below is a play that i have written to execute the task as a sudo user. - name: Testing the sudo user concept in this play hosts: all # user: ved become: yes become_method: su become_pass: root_123 tasks: - name: edits the contents of the file t

Re: [ansible-project] Ansible Privilege Escalation

2015-07-19 Thread Mona Gopal
I'm currently using ansible 1.9.2 On Sunday, July 19, 2015 at 1:47:09 AM UTC+5:30, Brian Coca wrote: > > What version of ansible? > > I just removed this in 2.0 as I thought it was an oversite (i cringed > at passwords embedded in playbooks), but I will reconsider if a good > case can be made f

[ansible-project] Progress bar indication while executing a task

2015-02-16 Thread Mona Gopal
Hi, Is there any way to indicate the progress while executing a task ?? For eg: I've written a task to copy the build on to the remote server, This copy would take more time due to the build size, having a progress bar will help us to know the progress state of the task. If there is any way pl

[ansible-project] Ansible 2.4 gathering facts stuck

2017-12-12 Thread Mona Gopal
Hi, Ansible2.4 is setup on CentOS7.4. The playbook execution gets stuck(for more than 5 mins) at gathering facts at times and few of the times it runs smoothly. What could be the reason for it? Regards, Mona G -- You received this message because you are subscribed to the Google Groups "An

[ansible-project] Re: msg: Failed to find required executable mysql

2018-01-23 Thread Mona Gopal
Hi, We are facing similar issue. The only difference being this error occurs at all times. Also to mention we are running this playbook on an AWS instance. On other servers and VM's it has worked before. Any help would be appriciated. Thanks in advance, Mona On Thursday, December 11, 2014 a

[ansible-project] Dictionary Parsing

2018-02-13 Thread Mona Gopal
We are trying to write Ansible playbooks for releasing patches for an application In patch releases there are 4 basic changes that can be there We will create 4 roles for those BinaryRole : For changing war files and jar files with backup and replacing the existing configurations ConfigRol

[ansible-project] Lineinfile + insertafter

2017-06-02 Thread Mona Gopal
Hello, The task is as below: - name: replace lineinfile: dest: /tmp/sample/test_file.txt regexp: "#}" insertafter: '\"compute\": 2,' line: "}" state: present And below is my file content: #OPENSTACK_API_VERSIONS = { #"data-processing": 1.1, #"identity": 3, #

[ansible-project] Control Ansible Logs

2017-07-18 Thread Mona Gopal
Hello, is there any way to suppress some part of the log which is printing on console while Ansible playbook execution.I want to fetch only the output returned from the script. I do not prefer to see the following output on the console. PLAY [Apply the following configuration on all hosts] *

[ansible-project] Any ansible module to JBOSS Explode ear file in the target server

2019-09-26 Thread Mona Gopal
Hi, I have a ear file in my local. And this needs to be exploded on the target machine. Apart from the unarchive module. Is there any JBOSS explode option in Ansible? Thanks in advance, Mona -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

[ansible-project] Ansible Playbook Doesn't run on RHEL 4.x

2016-08-22 Thread Mona Gopal
Hi, My ansible playbook works on 6.x and the same fails with the below error on 4.x Error is: fatal: [172.19.1.239]: FAILED! => {"changed": false, "failed": true, "module_stderr": "", "module_stdout": "Traceback (most recent call last):\r\n File \"/root/.ansible/tmp/ansible-tmp-1471850606.5

Re: [ansible-project] Using ansbile and ansbile-playbook with just the password for the remote host

2016-10-03 Thread Mona Gopal
Hi, I am facing a similar issue. I have non-root access to a server to which i am able to connect manually. But ansible throws "to use the 'ssh' connection type with passwords, you must install the sshpass program" error when i execute the playbook. My hosts file contains the ip address and crede

Re: [ansible-project] Using ansbile and ansbile-playbook with just the password for the remote host

2016-10-07 Thread Mona Gopal
Hi Kai, I have installed openssh-server and openssh-clients on the control machine and the error still persists. Any other way forward?? On Monday, October 3, 2016 at 4:10:07 PM UTC+5:30, Kai Stian Olstad wrote: > > On 03.10.2016 12:28, Mona Gopal wrote: > > I am facing a s

Re: [ansible-project] Using ansbile and ansbile-playbook with just the password for the remote host

2016-10-19 Thread Mona Gopal
5 PM UTC+5:30, Kai Stian Olstad wrote: > > On 07.10.2016 12:21, Mona Gopal wrote: > > On Monday, October 3, 2016 at 4:10:07 PM UTC+5:30, Kai Stian Olstad > > wrote: > >> > >> On 03.10.2016 12:28, Mona Gopal wrote: > >> > I am facing a similar issue.

[ansible-project] Unable to grant privileges using mysql_user module

2016-11-02 Thread Mona Gopal
Hi, I am trying to create a mysql user 'webaxnuser' and grant privileges to it. Below is the task to do the same. *- name: create use with all priv* * mysql_user: login_user=root login_password=pass login_host=188.16.2.3 host=% name=webaxnuser password=Webaxn@123 priv=*.*:ALL state=present* Th

[ansible-project] MYSQL Connectivity Issue in Ansible

2017-01-03 Thread Mona Gopal
Hello, I have the below task mysql_user: login_user={{ db_user_root }} login_password={{ db_pass_root }} name={{ db_user }} password={{ db_pass }} priv=*.*:ALL,GRANT state=present We're facing issue on running this, from machine B to install on machine A. Installing from machine A to machine

Re: [ansible-project] MYSQL Connectivity Issue in Ansible

2017-01-04 Thread Mona Gopal
On Wednesday, January 4, 2017 at 3:10:22 PM UTC+5:30, Toshaan Bharvani | VanTosh wrote: > > On 04/01/17 05:48, Mona Gopal wrote: > > Hello, > > > > I have the below task > > > > mysql_user: login_user={{ db_user_root }} login_password={{ db_pass_root

[ansible-project] Re: Need to source .bash_profile on target system

2017-01-10 Thread Mona Gopal
Hi, Even i am trying to source the bashrc file on my target system. Ansible runs successfully without errors but doesn't source the file. Below is my task: - name: source bashrc file shell: source ~/.bashrc args: executable: /bin/bash Didn't really find that executable arg helping me ou

[ansible-project] Parsing and Comparing a text file

2017-02-07 Thread Mona Gopal
Hello, My requirement is as below: A text file with configuration contents would be given to us by the product teams. I will have to compare this file against the one on the remote host , find out the difference, and replace values for the variables where it doesn't match. How is this achievab

[ansible-project] ValueError: No closing quotation

2017-02-20 Thread Mona Gopal
Hi, ansible-playbook -i hosts site.yml - -c paramiko Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 324, in sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-playbook", line 157, in main inventory = ansible.inventory.Inventory(options.inventory, vault

[ansible-project] Installing Ansible on AIX

2017-03-06 Thread Mona Gopal
Hello, I need ansible to be installed on AIX 6.1 and 7.1. Kindly provide the pre-requisites and steps for installation of ansible Also, would it require any changes to be done in the playbook? Have been referring to the below link, but hasn't been of much help: https://www.djouxtech.net/posts/an

Re: [ansible-project] Installing Ansible on AIX

2017-03-07 Thread Mona Gopal
17 at 08:49, Mona Gopal > > wrote: > > > > Hello, > > > > I need ansible to be installed on AIX 6.1 and 7.1. > > Kindly provide the pre-requisites and steps for installation of ansible > > > > Also, would it require any changes to be done in th

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Mona Gopal
1:31:05 PM UTC+5:30, Jon Stanley wrote: > > On Tue, Mar 7, 2017 at 2:49 AM, Mona Gopal > wrote: > > > > Have been referring to the below link, but hasn't been of much help: > > https://www.djouxtech.net/posts/ansible-on-aix/ > > Not an AIX expert (or even

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Mona Gopal
I am trying to install ansible on AIX 7.1 machine On Mar 27, 2017 8:32 PM, "Dick Visser" wrote: > On 27 March 2017 at 14:02, Mona Gopal wrote: > > Hey Jon, > > > > The link doesn't give an explanation on setting up Ansible. It only > guides > > t

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Mona Gopal
Monday, March 27, 2017 at 8:31:59 PM UTC+5:30, Dick Visser wrote: > > On 27 March 2017 at 14:02, Mona Gopal > > wrote: > > Hey Jon, > > > > The link doesn't give an explanation on setting up Ansible. It only > guides > > to setup python. > >

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Mona Gopal
DeKoenigsberg wrote: > > On Mon, Mar 27, 2017 at 11:04 AM, Mona Gopal > wrote: > > I am trying to install ansible on AIX 7.1 machine > > You need to be more specific. > > Ansible is a program that manages other systems via SSH. > > Are you (1) using an AIX sy

Re: [ansible-project] Installing Ansible on AIX

2017-03-27 Thread Mona Gopal
02:49, Mona Gopal > > wrote: > > Hello, > > > > I need ansible to be installed on AIX 6.1 and 7.1. > > Kindly provide the pre-requisites and steps for installation of ansible > > > > Also, would it require any changes to be done in the playbook? >