Re: [ansible-project] Simple Playbook for mysql query

2021-09-18 Thread steve missoh
Hello Adam, 1 - I think the module isn't loaded on the control node. I think you need to do load it locally because its complaining it cannot find the module. 2 - Ensure you have a mysql connector on the control node (most common is PyMySQL) In summary: after ansible-galaxy collection

[ansible-project] Re: Understanding relationship between -K & become vs ansible_ssh_user & ansible_ssh_pass

2021-09-18 Thread steve missoh
Hi, 1. You are correct but to be more precise, -K is the become password while -k is the user password 2. You are correct; just to add that become is a privilege escalation, meaning you still connect as X and then sudo as root on the managed node 3. ansible_user and ansible_password will peer

Re: [ansible-project] Transfer files from Server A to Server B

2021-09-18 Thread steve missoh
Dear Raja, do remember: 1. Use delegate_to in order to make synchronize module moves between managed nodes 2. from serverA to serverB you should ensure a connection mechanism is in place, preferably non interactive. For e.g. ssh passwordless example playbook: --- - hosts: se2 tasks: - name:

[ansible-project] Re: Simple Playbook for mysql query

2021-09-18 Thread steve missoh
export ANSIBLE_STDOUT_CALLBACK=debug or you put it in ansible.cfg in your project folder. (check current value with ansible-config dump | grep -i stdout_callba) Cheers ! Le samedi 18 septembre 2021 à 22:37:55 UTC+2, adam.f...@gmail.com a écrit : > Thank you for the explanation Flowerysong. > >

Re: [ansible-project] Playbook not able to SSH to the hosts

2021-09-18 Thread steve missoh
You can also use verbose when running the playbook. ( -vvv ) It may help you pinpoint the issue. I suspect Its either a resolution problem as pointed by rajthecomputerguy or an inventory problem. Le vendredi 17 septembre 2021 à 06:30:01 UTC+2, rajthecomputerguy a écrit : > First step is to

Re: [ansible-project] problems to address a configuration via ANSIBLE_CONFIG

2021-09-23 Thread steve missoh
Hi, I dont think that should be your case but just be also aware that: Ansible will not automatically load a config file from the current working directory if the directory is world-writable Regards. Le jeudi 23 septembre 2021 à 07:51:31 UTC+2, ra...@linuxia.de a écrit : > On 23/09/2021 08:42,

[ansible-project] Re: How to backup Cisco devices ?

2021-09-24 Thread steve missoh
Hi, check the builtin modules of any recent ansible engine. There are ~65 modules for IOS and VYOS and they are pretty mature. *ansible-doc -l | egrep "vyos|^ios"* Regards. Le vendredi 24 septembre 2021 à 18:02:38 UTC+2, hima...@gmail.com a écrit : > Hello, > > I really want to know if there is

[ansible-project] Re: Issue with template module

2021-09-20 Thread steve missoh
if the host you are running from is the control node, then a trick can consist in setting the python interpreter "wrongly" so in your inventory file, in front of your remote managed node (the rhel79 one), put this variable: ansible_python_interpreter=/usr/bin/python3 (or the location of python

[ansible-project] Re: Issue with template module

2021-09-20 Thread steve missoh
I dont think the issue is with your remote RHEL79. But rather from the host you are running the play from. Because you are using "connection: local", your localhost is responding on behalf of your remote. check the python path on your localhost; there are chances it doesnt have python2 but only

Re: [ansible-project] Inventory report

2021-09-21 Thread steve missoh
SImply, in your j2: {% for host in groups['all'] %} {{ hostvars[host]["ansible_facts"]['fqdn'] }} {{ hostvars[host]["ansible_facts"]['processor_vcpus'] }} {{ hostvars[host]["ansible_facts"]['memtotal_mb'] }} {{ hostvars[host]["ansible_facts"]['swaptotal_mb'] }} {% endfor %} then in your

Re: [ansible-project] Re: MYSQL failing on couple of servers

2021-09-21 Thread steve missoh
If: - you do have internet on the nodes - you already have pip installed Then you can install PyMySQL in userspace with your non-root id: pip3 install PyMySQL - -user Le mardi 21 septembre 2021 à 17:22:53 UTC+2, Raj a écrit : > Thanks Raj.. > Is it ok to install python verison 3. Because it

[ansible-project] Re: Ansible performing poorly on scale setups

2021-10-04 Thread steve missoh
I dont think ansible has ever been designed to perform at scale. Chef or Puppet are better at that because they are agent based. If you already tried mitogen and ssh pipelining and even increased the forks, I suggest you take a look at the new paradigm of execution environments that comes with

[ansible-project] Re: Module count for 2.9.0, 2.10.0, 2.11.0, 3.0.0, 4.0.0?

2021-10-04 Thread steve missoh
Maybe you can install each version via pip and count ... ansible-doc -t module -l | wc -l Le vendredi 1 octobre 2021 à 21:50:17 UTC+2, pat@networktocode.com a écrit : > Where can I find a reasonable estimate of the number of modules (formerly > together but now split into base/core and

[ansible-project] Re: How to encrypt ansible vault password

2021-09-24 Thread steve missoh
Hi, interesting question. I suggest you two approaches: 1) * Apply strict ACL on the vault password file (like 0400 for e.g.) * Do not version the file * rekey it frequently 2) Make use of an external or third party secret manager tool to store the vault password and get access to it through a

Re: [ansible-project] setup module is failing

2021-09-21 Thread steve missoh
Strange, especially if it was working b4. what has changed ? Are u able to run sudo without issues on the remote host ? Also check your sudoers file with visudo -c (on the remote node) Le mardi 21 septembre 2021 à 15:12:30 UTC+2, Altif a écrit : > Thank you Vladimir for responding. > Yes, both

Re: [ansible-project] setup module is failing

2021-09-21 Thread steve missoh
+2, Matt Martz a écrit : > This may be of interest to you: > https://bugzilla.sudo.ws/show_bug.cgi?id=993 > > There was a bug in sudo 1.9.8 that has since been fixed. > > On Tue, Sep 21, 2021 at 8:32 AM steve missoh wrote: > >> Strange, >> especially if it

[ansible-project] persistent cache while using inventory_plugin with python

2021-11-23 Thread steve missoh
Hi all, Can anyone point me to good resource detailing how to make use of jsonfile cache plugin in order to make it work with my custom inventory plugin (written in python) ? HELP ! -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

[ansible-project] Re: become root user using custom command in ansible

2021-11-23 Thread steve missoh
You need to configure sudo on the target server. and then use become_method = sudo become = yes in your ansible.cfg Le mardi 23 novembre 2021 à 14:06:58 UTC+1, hanumant...@gmail.com a écrit : > Hello All, > > In target server need to run a command like "mcs cmh" which prompts for > password

Re: [ansible-project] persistent cache while using inventory_plugin with python

2021-11-23 Thread steve missoh
mple of this implemented in virtualbox inventory plugin > <https://github.com/ansible-collections/community.general/blob/main/plugins/inventory/virtualbox.py> > . > > On Tue, Nov 23, 2021 at 6:57 PM steve missoh wrote: > >> Hi all, >> Can anyone point me to good

Re: [ansible-project] Re: become root user using custom command in ansible

2021-11-23 Thread steve missoh
su - root in > target server then can use become_method as sudo... but need to run custom > command mcs cmh to login as root user in target server. I don't think so we > can use become_metod = sudo in this scenario. > > On Tue, Nov 23, 2021 at 7:02 PM steve missoh wrote: > >

Re: [ansible-project] ssh management ansible

2021-10-25 Thread steve missoh
yeah ..but he wants multiple keys to be shipped at once. so the solution is to keep everything as it is and replace *with_key* with *with_file* Regards. Le samedi 23 octobre 2021 à 08:03:18 UTC+2, dick@geant.org a écrit : > On Sat, 23 Oct 2021 at 00:49, Ndricim Danaj wrote: > >> TASK [Set