Re: [ansible-project] Sending ansible output to python function

2020-06-11 Thread Abhijeet Kasurde
You can write a custom module and send the "output_cardTable" to it. Have your business logic in that custom module. You can read more about module development here - https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html#developing-modules-general On Thu, Jun 11, 2020

Re: [ansible-project] domainadminpass

2020-06-11 Thread Abhijeet Kasurde
You can read this doc for more information - https://docs.ansible.com/ansible/latest/user_guide/vault.html#use-encrypt-string-to-create-encrypted-variables-to-embed-in-yaml On Thu, Jun 11, 2020 at 9:00 PM Tony Wong wrote: > how do I specify a dominadminpass password to a vault file? > > -- >

Re: [ansible-project] group_by with random key values

2020-06-11 Thread Vladimir Botka
On Thu, 11 Jun 2020 11:39:07 -0700 (PDT) "'Mark Tovey' via Ansible Project" wrote: > .. set a common password on groups of servers. It's possible to use "pass" to generate and store the passwords https://www.passwordstore.org/ , and to use "passwordstore" Ansible lookup plugin to retrieve,

[ansible-project] Re: Cisco MDS | nxos_zone_zoneset

2020-06-11 Thread Jesse Lyon
Opened an issue with Cisco on github. https://github.com/Cisco-SAN/MDS_Ansible_Modules/issues/9 On Wednesday, June 10, 2020 at 3:22:43 PM UTC-4, Jesse Lyon wrote: > > I think I found the offending "Check" thats causing my headache. > > # Step1: execute show zone status and get >

[ansible-project] group_by with random key values

2020-06-11 Thread 'Mark Tovey' via Ansible Project
I am trying to develop a playbook to set a common password on groups of servers. The concept is that all servers within a given group would receive one randomly generated password, all servers within the next group would receive a different randomly generated password, and so on. The issue

Re: [ansible-project] Accessing Network Devices via Jump Hosts

2020-06-11 Thread Dick Visser
https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-configure-a-jump-host-to-access-servers-that-i-have-no-direct-access-to On Thu, 11 Jun 2020 at 19:17, Ashwajit Bhoutkar wrote: > Hi, > > > I've a general question related to Ansible for accessing the network >

Re: [ansible-project] deploy VM from template and customize guest

2020-06-11 Thread Tony Wong
can i get some help w this? My account to join the domain keeps getting locked out. This password has spaces in it like this "This is my pa$$w0rd!" but account keeps getting locked out On Tue, Jun 9, 2020 at 8:31 AM Tony Wong wrote: > ok I was able to use the customization_spec to join the

[ansible-project] ansible 2.9.4 - task with delegate_to: works, subsequent tasks fail

2020-06-11 Thread Andrew Caldwell
Hi All, hope this question makes sense. Here goes: Context: I have several automated patching playbooks that rely on stopping/starting services on windows before patching a database on Linux. We are using a python script to generate a dynamic inventory. We are leveraging a powershell script

[ansible-project] Accessing Network Devices via Jump Hosts

2020-06-11 Thread Ashwajit Bhoutkar
Hi, I've a general question related to Ansible for accessing the network devices. While going through the ansible documentations, I understood that the control host is directly connected to the network elements and send the commands for configurations. However, in real world scenarios,

Re: [ansible-project] Making Small Command Modules using Ansible

2020-06-11 Thread Sydo Luciani
Yes, you can use command module to run commands on targets that has python interpreter, or use raw module if python interpreter is not available on target mashine. check out example section: https://docs.ansible.com/ansible/latest/modules/list_of_commands_modules.html

Re: [ansible-project] Sending ansible output to python function

2020-06-11 Thread Srinivas Naram
Did you try to initiate Ansible playbook from Python code and capture Ansible output directly in the Python code ? You can use os module for it. Try using os.system('ansible-playbook wrote: > Hello, > > I have posted the following at >

[ansible-project] Sending ansible output to python function

2020-06-11 Thread 'Douglas R Christensen' via Ansible Project
Hello, I have posted the following at https://stackoverflow.com/questions/62309274/how-to-have-ansible-send-output-to-a-python-function-in-a-custom-library, but I wanted to share here to get some more insight. I am a newbie at working with Ansible and Python and I am attempting to develop an

[ansible-project] domainadminpass

2020-06-11 Thread Tony Wong
how do I specify a dominadminpass password to a vault file? -- 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. To

[ansible-project] Making Small Command Modules using Ansible

2020-06-11 Thread Ashwajit Bhoutkar
Hello, I've question related to a scenario which I can accomplish using Python but would like to achieve the same using Ansible. In the scenario, I first execute "show run int" command to see if it has IP address allocated, if ip is not allocated then a new IP address is allocated

Re: [ansible-project] VM not joining domain

2020-06-11 Thread Tony Wong
looks like the join account keeps locking out my domain account. any idea why its doing that? The password is correct. On Thu, Jun 11, 2020 at 7:35 AM Tony Wong wrote: > does this mean anything? > > > "invocation": { > "module_args": { > "annotation": "Master #1", >

Re: [ansible-project] Multi threading support in Ansible

2020-06-11 Thread Matt Martz
You have 1 worker process. One ansible-playbook process is the control process, the other is the worker. On Thu, Jun 11, 2020 at 9:43 AM Jagadeeshkumar Dittakavi < d.jagadeeshku...@gmail.com> wrote: > Thank you Matt! > In the above example I have explicitly passed --forks=1 but still there > are

Re: [ansible-project] Multi threading support in Ansible

2020-06-11 Thread Jagadeeshkumar Dittakavi
Thank you Matt! In the above example I have explicitly passed --forks=1 but still there are 2 worker processes(PIDs 69484 and 69520) were spawned, that means there will be minimum 2 workers get spawned and we can't limit that to one? I understand that there is no control to limit the total

Re: [ansible-project] VM not joining domain

2020-06-11 Thread Tony Wong
does this mean anything? "invocation": { "module_args": { "annotation": "Master #1", "cdrom": [], "cluster": "RW-VA", "convert": null, "customization": { "dns_servers": [

Re: [ansible-project] Multi threading support in Ansible

2020-06-11 Thread Matt Martz
There are a number of steps involved here. 1. The primary playbook process spawns a worker 2. The worker executes the async_wrapper for the command module 3. The async_wrapper forks to daemonize 4. The async_wrapper executes the transferred module 5. The actual module is contained within what we

Re: [ansible-project] simplify always the same conditionals - evaluate contents of a string in conditionals (changed_when, failed_when, ...)

2020-06-11 Thread Michael K.
Hi Brian, thanks for your advice. I've added the variable as host var ansible_fortios_default_changed_when: "{{ 'meta' in r and r['meta']['status'] == 'success' and r['meta']['revision_changed'] == true }}" ansible_fortios_default_failed_when: "{{ 'meta' not in r or r['meta']['status'] ==

Re: [ansible-project] Multi threading support in Ansible

2020-06-11 Thread Jagadeeshkumar Dittakavi
@Matt, Got another question in concurrency support in Ansible. Is there any way to limit the number of processes that could be spawned on a given host? My requirement is not to execute the commands/scripts remotely. In my case, the whole play needs to be executed on locahost only. I have tried

[ansible-project] Re: Windows Domain/Ansible Kerberos Auth Issues Still

2020-06-11 Thread David Foley
Are these Linux Machines? how many Domain Controllers are in your Environment if you have more then one it may be doing a round-robin on the Kerberos and failing on one Domain and not on the other.: you need to start restricting down to only allow your Linux Server to Connect to one AD. --

Re: [ansible-project] List all variables only defined in hosts file corresponding to a host

2020-06-11 Thread Vladimir Botka
On Wed, 10 Jun 2020 22:09:40 -0700 (PDT) utkarsh srivastava wrote: > I want to list all variable and it's value defined in hosts file > corresponding to a host > [hostgroup1] > host1 variable1=value1 variable2=value2 variable3=value3 You might improve the situation with name-spacing of

[ansible-project] Need help to develop a playbook to take vm snapshot by choosing only os disk in RHV environment

2020-06-11 Thread Ramakrishna Veeragandham
Need help to develop a playbook to select only os disk in RHV while taking VM snapshot. The use case to develop a playbook to take vm snapshot by choosing only os disk in RHV environment. Ansible version is 2.8 and RHV version is 4.3. I didn't find much documentation on how to select specific