Re: [ansible-project] Listing installed packages

2021-10-14 Thread 'Jean-Yves LENHOF' via Ansible Project
Any ideas? Thanks, Harry You can use templating to have it on one line... But be careful : - you can have more than one version of a package installed. Example: kernel - you can have one x86_64 and one i686 or i386 version of a package installed Regards, -- Jean-Yves LENHOF -- You re

Re: [ansible-project] centos7 target - sudden python interpreter trouble

2021-10-14 Thread 'Jean-Yves LENHOF' via Ansible Project
e the python interpreter variable in a config file ? (/etc/ansible.cfg, ~/.ansible.cfg, etc...) See: https://docs.ansible.com/ansible/latest/reference_appendices/config.html Regards, -- Jean-Yves LENHOF -- You received this message because you are subscribed to the Google Groups "Ansibl

Re: [ansible-project] centos7 target - sudden python interpreter trouble

2021-10-14 Thread 'Jean-Yves LENHOF' via Ansible Project
Le 2021-10-14 13:05, dulhaver via Ansible Project a écrit : On 10/14/2021 12:59 PM 'Jean-Yves LENHOF' via Ansible Project wrote: Le 2021-10-14 12:56, dulhaver via Ansible Project a écrit : > thx for the hint > >> On 10/14/2021 12:16 PM 'Jean-Yves LENHOF' via Ansible Proje

Re: [ansible-project] centos7 target - sudden python interpreter trouble

2021-10-14 Thread 'Jean-Yves LENHOF' via Ansible Project
Le 2021-10-14 12:56, dulhaver via Ansible Project a écrit : thx for the hint On 10/14/2021 12:16 PM 'Jean-Yves LENHOF' via Ansible Project wrote: Maybe something wrong with alternatives ? > alternatives --list | grep -i python turns out empty. have tried to get something work

Re: [ansible-project] centos7 target - sudden python interpreter trouble

2021-10-14 Thread 'Jean-Yves LENHOF' via Ansible Project
without having specified any python interpreter. any ideas what may be going wrong here? Hi, Maybe something wrong with alternatives ? alternatives --list | grep -i python Regards, -- Jean-Yves LENHOF -- You received this message because you are subscribed to the Google Groups "An

Re: [ansible-project] lvol module - depency problem parted/gparted

2021-10-12 Thread 'Jean-Yves LENHOF' via Ansible Project
Le 2021-10-12 14:50, dulhaver via Ansible Project a écrit : > > On 10/12/2021 1:31 PM 'Jean-Yves LENHOF' via Ansible Project wrote: > > > > parted package is available. You probably are doing something wrong > > A "dnf update" and "dnf install par

Re: [ansible-project] lvol module - depency problem parted/gparted

2021-10-12 Thread 'Jean-Yves LENHOF' via Ansible Project
understanding on my part) can anybody point out where I am taking a wrong turn here and push me into the right direction? parted package is available. You probably are doing something wrong A "dnf update" and "dnf install parted" should work ! Regards, -- Jean-Yves LEN

Re: [ansible-project] Custom facts written using resource module builder

2021-09-05 Thread 'Jean-Yves LENHOF' via Ansible Project
Show us the code and different results when it works and when it don't Regards, Le 05/09/2021 à 11:15, nitesh shet a écrit : Hi, I had written a custom facts for NTP server but it is acting weirdly everytime i run the facts module using playbook , sometimes values will come and sometimes

Re: [ansible-project] Permission Denied error

2021-09-03 Thread 'Jean-Yves LENHOF' via Ansible Project
Hi, Look at your /etc/ansible.cfg $HOME/.ansible.cfg in your home or your inventories files, you probably surcharge ansible_ssh_common_args somewhere ! Regards, Le 03/09/2021 à 16:43, aman kumar chagti a écrit : I'm manually able to log in to target VM by password...but no thru

Re: [ansible-project] Permission Denied error

2021-09-02 Thread 'Jean-Yves LENHOF' via Ansible Project
The ssh test you made is using the ansible controller server ? Are you sure you are using the good ansible user on the target host ? (-u parameter for ansible-playbook) Regards, JY Le 02/09/2021 à 14:48, aman kumar chagti a écrit : yes, sshpass is inistalled On Thursday, September 2,

Re: [ansible-project] Permission Denied error

2021-09-02 Thread 'Jean-Yves LENHOF' via Ansible Project
Le 02/09/2021 à 14:53, aman kumar chagti a écrit : @jyle if sshpass needs to be installed on target VM as well?? Nope, only on server side Regards, JYL -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group

Re: [ansible-project] Permission Denied error

2021-09-02 Thread 'Jean-Yves LENHOF' via Ansible Project
If you want password authentication, you need sshpass on your ansible controller server. Did you install it ? Regards, JYL Le 02/09/2021 à 13:55, aman kumar chagti a écrit : when I try to run the playbook on a remote VM using password-based  authentication, I'm getting the following error:

Re: [ansible-project] Winrm configuration issue

2021-07-22 Thread 'Jean-Yves LENHOF' via Ansible Project
Hi, Is the account local and your GPO (seems that there are some) does'nt allow to log in with this account remotely ? Regards, JYL Le 22/07/2021 à 12:09, Thanh Nguyen Duc a écrit : Hi I have tried to reset password, telnet to client. All ok. Even tried to use the service account to

[ansible-project] Re: Install a french version of SQLServer on an english windows server with ansible

2021-06-26 Thread 'Jean-Yves LENHOF' via Ansible Project
Le 2021-06-24 19:08, Jean-Yves LENHOF a écrit : Hi, I try to silently install a french version of SQLServer (this is not my idea, it's become this is the licensed version we have) with ansible using some code like this (I already installed MUI French lang pack via ansible) : - name

[ansible-project] Install a french version of SQLServer on an english windows server with ansible

2021-06-24 Thread 'Jean-Yves LENHOF' via Ansible Project
t If I'm connecting on the server the UI Lang is changed to French (so this part seems to work) and if I run the command line on powershell it succeed. On Linux I would have just surcharged LANG parameter before my command but on windows, I think this is not possible... Is there's something

Re: [ansible-project] Reg: VMware Tools install using Ansible

2021-05-19 Thread Jean-Yves LENHOF
other script to install it on the freshly created VM. Thanks in advance Harsh Chawda -- -- Jean-Yves LENHOF jean-y...@lenhof.eu.org -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving e

Re: [ansible-project] unable to create VM on esxi 7.0

2021-04-05 Thread Jean-Yves LENHOF
Hi, Please explain which module you are using when asking questions ! So have a guess that you are using this one https://docs.ansible.com/ansible/2.8/modules/vmware_guest_module.html#vmware-guest-module So two options : - ask to update the certificate with a trusted and not expired one -

Re: [ansible-project] Am I missing something or Ansible is uselessly verbose?

2021-03-01 Thread Jean-Yves LENHOF
"user" is the name of a module ! (since 2.10 it is now ansible.builtin.user but for now there's some backward compatibility) You can alternate part of your playbook with some being root or another user and some with the remote_user. So these different tag are needed, but you can factorize them

Re: [ansible-project] Re: Ansible Without Python?

2021-02-24 Thread Jean-Yves LENHOF
Le 24/02/2021 à 22:18, Jon Forrest a écrit : On 2/24/2021 12:42 PM, Sam Doran wrote: Jimi actually did this a while ago to see if there were any benefits. I wasn't aware of this. Thanks for the reference. In the end, there was no real benefit to moving to

Re: [ansible-project] Ansible Without Python?

2021-02-24 Thread Jean-Yves LENHOF
Le 24/02/2021 à 21:21, Wei-Yen Tan a écrit : Well on the client side you can run any language. Ansible uses the shebang on the task module to execute the script. I have even written a custom module that runs powershell on a linux client. You could run bash. As long as you output json object  

Re: [ansible-project] Ansible Without Python?

2021-02-24 Thread Jean-Yves LENHOF
Hi, There's part of the code that run on the controller, but also on the client. Today you can run the same ansible code on unix and linux server because the python binary is the one used on the client side, if using a compiled language you need to have all the binary version of all your

Re: [ansible-project] inventory inside play

2021-02-18 Thread Jean-Yves LENHOF
Hi, Another way of doing... You can also change the inventory live with some modules https://docs.ansible.com/ansible/latest/collections/ansible/builtin/add_host_module.html

Re: [ansible-project] Re: GCP Tunnel through IAP

2021-02-09 Thread Jean-Yves LENHOF
Hi, Just gave some directions in the issue on github to make it work Regards, JYL Le 09/02/2021 à 17:00, C.J. Brown a écrit : Say, did you ever find a better solution here?  Because I've run into the same problem recently, and...well, it's ugly. I saw that this ticket had been filed

Re: [ansible-project] Re: module stderr

2021-01-26 Thread Jean-Yves LENHOF
Probably you are not using the same ansible version locally and under awx ⁣Télécharger BlueMail pour Android ​ Le 26 janv. 2021 à 21:39, à 21:39, "kevin.mu...@gmail.com" a écrit: >Managed to fix the issue. > >within the block of code under Edit omsagent.conf, I was using the >template >module

Re: [ansible-project] Ansible Organization - When to split out projects

2021-01-25 Thread Jean-Yves LENHOF
Le 25/01/2021 à 16:03, John Petro a écrit : Good morning,    I am working on setting up an ansible repository, for work.  We are going to be using AWX eventually ( sooner rather than later ).  What I am wondering, is how people decided to split up their ansible project directories. My first

Re: [ansible-project] how to get the host in groups children?

2021-01-20 Thread Jean-Yves LENHOF
Hi, 1/ Sounds like you use a lot the when clause to limit the impact of action to some servers. Why you did'nt use more the hosts clause to handle the action on specific hosts ? You can have more than one hosts clause in a playbook Notice that you can reuse variable in a previous play in

Re: [ansible-project] register variable can't be used in shell module?

2021-01-20 Thread Jean-Yves LENHOF
first host in group master Le 20/01/2021 à 08:33, Jean-Yves LENHOF a écrit : You're looking for something like this I think (not tested)  :     - name: add master node       shell: "kubeadm join {{ groups['master']|first }}:6443 --token {{hostvars['master']['kubeadm

Re: [ansible-project] register variable can't be used in shell module?

2021-01-19 Thread Jean-Yves LENHOF
I'm wrong it's not hostvars['master'], because master is not the name of your first host in group master Le 20/01/2021 à 08:33, Jean-Yves LENHOF a écrit : You're looking for something like this I think (not tested) :     - name: add master node       shell: "kubeadm join {{ g

Re: [ansible-project] register variable can't be used in shell module?

2021-01-19 Thread Jean-Yves LENHOF
You're looking for something like this I think (not tested)  :     - name: add master node       shell: "kubeadm join {{ groups['master']|first }}:6443 --token {{hostvars['master']['kubeadm_token'].stdout}} --discovery-token-ca-cert-hash sha256:{{hostvars['master']['kubeadm_hash'].stdout}}

Re: [ansible-project] Ansible --become not working when “sudo with NOPASSWD” is not activated on remote machine - MODULE FAILURE

2021-01-15 Thread Jean-Yves LENHOF
Hi, Sounds strange indeed. Please try to connect to remote server with ssh with remote_user, and do a "sudo ls /" for example to see if the problem occurs You did authorize all commands for sudo and not only "sudo su -"? (something like this below) %sudo    ALL=(ALL:ALL) ALL Regards,

Re: [ansible-project] SQL Server Dynamic Database Creation using Ansible

2021-01-15 Thread Jean-Yves LENHOF
All good editors (you could to install some plugins) have syntax and quoting coloring enabled vim and visual studio code are some examples, but there are quite a few https://docs.ansible.com/ansible/latest/community/other_tools_and_programs.html The documentation of ansible is quite good,

Re: [ansible-project] help while running sudo in Ansible playbooks

2021-01-15 Thread Jean-Yves LENHOF
Le 15/01/2021 à 06:08, Ramakrishna Veeragandham a écrit : Hi Ansible team, I am Ram.  We need some help in running the Ansible playbook ( specifically how to add sudo while running playbooks ).  in your environment, we can run all admin related commands with sudo acess (  by adding sudo in

Re: [ansible-project] SQL Server Dynamic Database Creation using Ansible

2021-01-14 Thread Jean-Yves LENHOF
Hi, Read docs a little ! https://docs.ansible.com/ansible/latest/user_guide/playbooks_prompts.html DbName is the variable, so that should be the name DB Config is the prompt written on the the screen, so that should be the prompt try changing like this in your code :    vars_prompt:      

Re: [ansible-project] Options in Mount module for fstab

2021-01-13 Thread Jean-Yves LENHOF
Hi, For xfs file system, fsck is not necessary. For the record on the man page of fsck.xfs "fsck.xfs - do nothing, successfully" On rare occasion you could need xfs_repair ! Regards, JYL Le 13/01/2021 à 22:28, Matt Martz a écrit : Those are the `dump` and `passno` arguments for the

Re: [ansible-project] How are group_vars merged?

2021-01-07 Thread Jean-Yves LENHOF
Hi, Perhaps here is what you're looking for... https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#how-variables-are-merged There's a parameter available to change the default behaviour Regards, JYL Le 07/01/2021 à 18:25, Axel Rau a écrit : Hi all, I try to understand

Re: [ansible-project] CentOS 7 is end-of-life when using Ansible?

2020-12-17 Thread Jean-Yves LENHOF
Hi, Statement here could interest you : https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html Regards, Le 17/12/2020 à 08:57, Onno a écrit : Hi all, I stumbled onto the problem If you require Python 3 support use the `dnf` Ansible module instead." This message

Re: [ansible-project] Re: Creating LVG's and LVs in Azure

2020-12-11 Thread Jean-Yves LENHOF
Hi, The message is pretty clear, you have no u01 variable defined in you vars file ! So when the line ' when: u01.vg !="None"' evaluate it crashed because u01 is not known... Don't know exactly what you want to do, but I saw ASM, so think about Oracle Not sure mixing asm disk and LVM

Re: [ansible-project] Setting Conditionals with Output

2020-08-11 Thread Jean-Yves LENHOF
Hi, Perhaps using the module which does this, you'll have the idempotence ;-) https://docs.ansible.com/ansible/latest/modules/win_share_module.html Regars, JYL Le 11/08/2020 à 17:00, jhix...@gmail.com a écrit : New at Ansible and still trying to get the hang of setting conditional based

Re: [ansible-project] Re: Privilege escalation error when running a sudo command on AWS Ubuntu machine

2020-08-08 Thread Jean-Yves LENHOF
Hi, su and sudo are two ways to become another user. So both method are available in ansible. Very often indeed in public cloud, this is the sudo way which is used during the provisionning of the server and assigning ssh key "man su" and "man sudo" should help you to understand differences.

Re: [ansible-project] Ansible on Azure Pipelines

2020-08-07 Thread Jean-Yves LENHOF
Hi, Does not know about Azure pipelines... But be aware that using ping module is already using ssh connection, not a simple ping Regards, JYL Le 07/08/2020 à 14:15, Swapna Priya a écrit : Has anyone used Ansible in Azure pipelines? I am using a simple ping command to connect to a VM. It

Re: [ansible-project] Unable to update debian header and build essential using Ansible playbook

2020-08-05 Thread Jean-Yves LENHOF
Hello, There's a lock on a fact during the gather fact... There's probably something which goes wrong on your server you need to fix You can try to limit the gather fact to see where the problem could be Explications on how to do it is there :

Re: [ansible-project] Unable to receive Emall despite of success message from ansible script

2020-07-25 Thread Jean-Yves LENHOF
ansible documentation. image.png On Sat, 25 Jul 2020 at 22:16, Jean-Yves LENHOF mailto:jean-y...@lenhof.eu.org>> wrote: Look at your logs mail server(the one which answer on tcp port 25) if there's something interesting in it... Regards, Le 25/07/2020 à 18:43,

Re: [ansible-project] Unable to receive Emall despite of success message from ansible script

2020-07-25 Thread Jean-Yves LENHOF
Look at your logs mail server(the one which answer on tcp port 25) if there's something interesting in it... Regards, Le 25/07/2020 à 18:43, Samir Kothawade a écrit : Ansible script: - hosts: local   gather_facts: no   tasks:    - name: mailing longevity report      become: true      mail:  

Re: [ansible-project] Ansible Remote Versioning

2020-07-22 Thread Jean-Yves LENHOF
Hi, I gave you some ideas, I did'nt say this is a good practice to know what tasks has been already ran. When you produce ansible role and playbook, you should ensure that you can run it whenever previous state was and if run more than once without modification results on server should be

Re: [ansible-project] Need help for install java

2020-07-21 Thread Jean-Yves LENHOF
Hi, Where did the package come from ? (sound like alien package of an rpm ?) Some ideas : - If the package came from Oracle, very often, an interaction is needed to accept EULA...  (I had that kind of problem on CentOS a while ago) - Have you tried a manual install ? - Also I saw that

Re: [ansible-project] Ansible Remote Versioning

2020-07-21 Thread Jean-Yves LENHOF
Interesting question. A local fact is a way : https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#local-facts-facts-d At the beginning of your playbook you test is the fact relating to your playbook exist. If existing, is the version different from the playbook you

Re: [ansible-project] how to determine group's id?

2020-07-14 Thread Jean-Yves LENHOF
Hi, Not tested, but should be closed to what you're looking into : - getent: database: group key: monitor split: ':' - debug: var: getent_group[1] Regards, JYL Le 14/07/2020 à 21:58, Laci a écrit : Do you guys have a good idea what is the best way to determine a group's id them reuse that

Re: [ansible-project] Task to modify an ansible host's ip-addr while connected

2020-07-01 Thread Jean-Yves LENHOF
Hi, Perhaps you should look around "meta: reset_connection" described here : https://docs.ansible.com/ansible/latest/modules/meta_module.html Little more details here : https://www.ansible.com/blog/rebooting-network-devices-with-ansible But I think you have another problem to manage the ip

Re: [ansible-project] string not recognised in groups_vars/all

2020-06-30 Thread Jean-Yves LENHOF
Dot, dash are operators in python on which ansible is based... It is not a good idea to use them, but if you use them, there is some notices about it here : https://docs.ansible.com/ansible/latest/reference_appendices/faq.html And there are issue :

Re: [ansible-project] Re: Vm mount iso and install vmware tools

2020-05-26 Thread Jean-Yves LENHOF
Hi, Just a guess (I'm not a windows man)...Perhaps you need to do silent install because you are not "desktop logged" when you use ansible. Have a look here for some example (you need to look for the good ones for your version, but you've got the idea)

Re: [ansible-project] Re: copy restricted files from server A to B

2020-05-19 Thread Jean-Yves LENHOF
Use copy (to copy on the second server), fetch (to get the file on the controller), and stat (to get rights) modules Regards, JYL Le 19/05/2020 à 22:38, Laci a écrit : Another detail is that serverA can't talk to serverB or vice versa, only the Ansible server can talk to both of them On

Re: [ansible-project] Vm mount iso and install vmware tools

2020-05-19 Thread Jean-Yves LENHOF
As written in my email : win_get_url module ⁣Télécharger BlueMail pour Android ​ Le 19 mai 2020 à 17:42, à 17:42, Tony Wong a écrit: >I am not sure. because curl is not available on windows boxes. > >On Tue, May 19, 2020 at 8:16 AM Jean-Yves LENHOF > >wrote: > >> Hi,

Re: [ansible-project] Vm mount iso and install vmware tools

2020-05-19 Thread Jean-Yves LENHOF
Hi, Why not using curl on this site or into an internal server synchronized on this server : https://packages.vmware.com/tools/esx/index.html For example you have direct executable here : https://packages.vmware.com/tools/esx/6.7u3/windows/x64/ Use win_get_url module and win_command_module

Re: [ansible-project] Task reported as "changed" even if unchanged

2020-05-16 Thread Jean-Yves LENHOF
Hi, you should better use systemd module instead of command to do what you intended to do... This module is better at idempotence that command Command is not idempotent by default, you have to do it (there are different ways to do it), this is why you have some changes Regards, Le

Re: [ansible-project] Automate Oracle Database Shutdown and Startup with Ansible.

2020-05-16 Thread Jean-Yves LENHOF
There's no /etc/oratab on yours servers ? Regards, Le 16/05/2020 à 08:30, Akshay Bora a écrit : Hi Everyone, I am writing an ansible script to automate the task of oracle database shutdown and startup. I am facing a difficulty in reading the environment variables from the XML files.

Re: [ansible-project] fatch module

2020-05-15 Thread Jean-Yves LENHOF
I rather would use something like syslog, logstash, filebeat to do this type of job instead of ansible... Regards, JYL Le 15/05/2020 à 09:53, rakesh rathore a écrit : Hi Team, Can anyone slove this for me please? Imaginetherearemanyserversrunninginproductionsetupandstoringsomedataata

Re: [ansible-project] Re: Window patch module not working on 2.9 Ansible

2020-05-12 Thread Jean-Yves LENHOF
Hi, First thing I see is that attribute "catagory_names" should be "category_names". I think there's another problem also, but don't see it yet... Regards, JYL * * Le 12/05/2020 à 07:36, Amit Kumar a écrit : Any help will be really appreciable, As i am stuck here and waste day but

Re: [ansible-project] Re: strange variable behaviour/error

2020-05-10 Thread Jean-Yves LENHOF
OK here is the playbook. What is the complete template, the inventory you use and the command you've used ? Regards, Le 09/05/2020 à 18:25, Alfredo De Luca a écrit : Apologies if it wasn't clear. So it's a playbook that create an inventory file from a template for kolla-ansible so it can

Re: [ansible-project] strange variable behaviour/error

2020-05-09 Thread Jean-Yves LENHOF
Hi, Please give us a small case with all the pieces and how you run it (ansible-playbook )... You speak about an inventory but it is a template, sound strange given like this... Le 09/05/2020 à 15:55, Alfredo De Luca a écrit : Hi all. I have ansible 2.9.7 running on ubuntu. I am just

Re: [ansible-project] Need ideas how to reflect progress os ansible job in web page

2020-05-08 Thread Jean-Yves LENHOF
Hi, Use ARA ? https://ara.recordsansible.org/ Regards, JYL Le 08/05/2020 à 14:39, Meir Yanovich a écrit : hello all i have a simple web page that invokes the ansible job via command line as high level idea how can i reflect some progress from the ansible job to the web page can i set

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

2020-05-07 Thread Jean-Yves LENHOF
Hi, Perhaps, you should have a look on these : https://github.com/oravirt/ansible-oracle https://github.com/oravirt/ansible-oracle-modules A lot of works has been done here If you don't want all of these, a step in the right direction here :

Re: [ansible-project] rpm--import issues

2020-05-06 Thread Jean-Yves LENHOF
Hi, There's a module to import key, please use it ! https://docs.ansible.com/ansible/latest/modules/rpm_key_module.html Regards, JYL Le 06/05/2020 à 12:17, Quad Zero a écrit : Hi all, Thank you for your help in my last post. I have come quite a way (small compared to many of you) but

Re: [ansible-project] Check status of VMware tools & reboot if VMware tools are not running

2020-04-18 Thread Jean-Yves LENHOF
Please as said by another people here, respect indentations stricly ! vmware_guest_info& name have not the same indentation as written by A. Kasurde Regards, JYL Le 18/04/2020 à 22:14, Tony Wong a écrit : this is the playbook --- - name: get info vm   hosts: localhost   connection: local

Re: [ansible-project] Task Status at Playbook runtime

2020-04-18 Thread Jean-Yves LENHOF
Hi, Register a variable for the module you call and after test this variable... More info here : https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#rc Example on a change (first link in google) :

Re: [ansible-project] [HOSTVARS][MERGED] Unexpected behavior with merge variables of different host which are in several groups

2020-04-14 Thread Jean-Yves LENHOF
Hi, As I understand etc_ip and postgresql_ip are variable specific for each host, and so they should be in hosts parts of your inventory file (Here you are doing a mix). postgresql_existscan be setup in a your postgresql group, but I'm not sure if it is really necessary to have it See

Re: [ansible-project] custom facts - "msg": "[Errno 8] Exec format error: b'/etc/ansible/facts.d/custom.fact'", "rc": 8}},

2020-04-05 Thread Jean-Yves LENHOF
a écrit : Tried that but still not working. Thanks for your help. On Saturday, April 4, 2020 at 7:35:12 PM UTC+11, Jean-Yves LENHOF wrote: The first time you run it, files are not yet in place, so you probably need to regather fact, no ? You can do it with setup: Regards, Le 04/04

Re: [ansible-project] custom facts - "msg": "[Errno 8] Exec format error: b'/etc/ansible/facts.d/custom.fact'", "rc": 8}},

2020-04-04 Thread Jean-Yves LENHOF
The first time you run it, files are not yet in place, so you probably need to regather fact, no ? You can do it with setup: Regards, Le 04/04/2020 à 10:18, Rajesh a écrit : Could someone help why I am still getting the below error? Thanks, Rajesh On Thursday, April 2, 2020 at 5:38:27 PM

Re: [ansible-project] ansible nfsclient error

2020-03-30 Thread Jean-Yves LENHOF
Behalf Of *Jean-Yves LENHOF *Sent:* Monday, March 30, 2020 2:20 PM *To:* ansible-project@googlegroups.com *Subject:* Re: [ansible-project] ansible nfsclient error Hi, Le 30/03/2020 à 08:15, Sandy Hung a écrit :   src: '192.168.1.146/share' should be :   src: '192.168.1.146:/share' Using

Re: [ansible-project] ansible nfsclient error

2020-03-30 Thread Jean-Yves LENHOF
Hi, Le 30/03/2020 à 08:15, Sandy Hung a écrit :   src: '192.168.1.146/share' should be :   src: '192.168.1.146:/share' Using 777 for rights is not a very good practice Regards, JYL -- You received this message because you are subscribed to the Google Groups "Ansible Project"

Re: [ansible-project] Re: expect and "Press to continue."

2020-03-27 Thread Jean-Yves LENHOF
I think 'Question' is not a parameter, it's the real question in the sample of ansible expect module I think you could probably remove this line as you want only one answer to each question. Regards, Le 27/03/2020 à 11:18, Jost Rakovec a écrit : Hi is that possible to do with ansible or

Re: [ansible-project] nfs client ansible

2020-03-27 Thread Jean-Yves LENHOF
Wrong argument : sate --> state Regards, Le 27/03/2020 à 10:34, sandy.h...@abagile.com a écrit : no BR Sandy *From:*ansible-project@googlegroups.com *On Behalf Of *Mark Whaite *Sent:* Friday, March 27, 2020 5:16 PM *To:* ansible-project@googlegroups.com *Subject:* Re:

Re: [ansible-project] How to incorporate if else statement in Jinja template.

2020-03-06 Thread Jean-Yves LENHOF
Hi, Your error is about a for loop, but your template included in your email doesn't have this loop. Looks like you didn't give us the good one Regards, JYL Le 06/03/2020 à 11:52, Shifa Shaikh a écrit : Vladimir Hi, I tried | {%if{{playbook_dir }}/{{item }}/bad*.txt |exists %} {{item

Re: [ansible-project] Ansible output customize

2020-03-06 Thread Jean-Yves LENHOF
"msg": "Server Uptime is -> [' 00:50:34 up 4 min,1 user,load average: 0.01, 0.04, 0.03']" "msg": "Server Kernel is --> ['4.1.12-124.36.4.el7uek.x86_64']" On Tuesday, March 3, 2020 at 12:55:40 PM UTC-8, Jean-Yves LENHOF wrote: Hi, What

Re: [ansible-project] Ansible output customize

2020-03-03 Thread Jean-Yves LENHOF
Hi, What is nicely formatted ? Please show on an example what you want Regards, JYL Le 03/03/2020 à 21:42, Parveen Datt a écrit : Hi Team I have written a playbook and using debug variable we are reading the output in multiple play. Is there any way we can customize the output of each

Re: [ansible-project] Re: How to get IP address from controller's /etc/hosts file?

2020-03-03 Thread Jean-Yves LENHOF
Hi, Not read everything but first thing is that if you have a pipe in a command call you should use shell module instead... That should fix your first issue. Regards, JYL Le 03/03/2020 à 21:42, Robert F a écrit : Note that my awk command should say "print $1" to get the IP address.  

Re: [ansible-project] variable undefined?

2020-02-29 Thread Jean-Yves LENHOF
Hi, Variable are for a host You use "localhost" and "staging" unless the group staging contains only localhost, yes you will have some undefined variable for the different hosts in your staging group Regards, JYL Le 29/02/2020 à 09:48, Dave York a écrit : I'm confused why I'm getting

Re: [ansible-project] [ Ansible ] - Weird nested loop help

2020-02-24 Thread Jean-Yves LENHOF
Not so obvious to understand... Perhaps you should try progressive steps and not wanting to do everything in one unique step To look for specific file, perhaps you should use the find module with a register And after loop on these files using the variable registered before... Regards,

Re: [ansible-project] shell module failing for grep

2020-02-22 Thread Jean-Yves LENHOF
Hi, Did you submit the shell command with the same user ? Regards, Le 21/02/2020 à 21:31, Matt Zagrabelny a écrit : Greetings, I'm running ansible 2.9 (2.9.4+dfsg-1) and I've searched the mailing list archives regarding this issue, but I haven't found out why I'm seeing what I am seeing.

Re: [ansible-project] Playbook doesn't run completely stuck after "check if reboot required"

2020-02-12 Thread Jean-Yves LENHOF
Why not using the "reboot" module which is done for that instead of using shell module with some tricks ? Regards, JYL Le 12/02/2020 à 19:30, Work-Hard a écrit : *Playbook doesn't run completely stuck after "check if reboot required". Please assist!* * * * Play-Book* --- - hosts: ubuntu  

Re: [ansible-project] What is the best approach to creating a inlude_vars file for my requirement

2020-01-28 Thread Jean-Yves LENHOF
Le 28/01/2020 à 22:13, Stefan Hornburg (Racke) a écrit : On 1/26/20 3:11 PM, Shifa Shaikh wrote: Dick Hi, My requirement is not about configuring a webserver. It is to maintain a check on a set of files. If the file changes by checksum or permissions I wish to trigger an alert. Thus, my

Re: [ansible-project] Basic beginner question

2020-01-26 Thread Jean-Yves LENHOF
Hi, You probably looking for ansible_os_family which is RedHat for these distributions : RedHat EL, CentOS, Amazon, etc... You should probably test the major version (between 6 and 7, there's service and systemctl which are kind different for example, I suppose you're not modifying only ssh

Re: [ansible-project] Hostvars giving me undefined error

2020-01-24 Thread Jean-Yves LENHOF
Hi, You should better use the find module instead of shell module and ls. As said, yum seem to be a group... To use hostvars special variable you need to use host and not group... Something like this will work : msg: "{{ hostvars['YUM01']['some_value'] }}" But instead of asking to remove

Re: [ansible-project] Unable to print regex registered variable in Ansible

2020-01-15 Thread Jean-Yves LENHOF
gt; File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", >line >> 773, in do_template >> data = _escape_backslashes(data, myenv) >> File "/usr/lib/python2.7/site-packages/ansible/template/__init__.py", >line >> 145, in _escape_backslashes &

Re: [ansible-project] Unable to print regex registered variable in Ansible

2020-01-14 Thread Jean-Yves LENHOF
Hi, Perhaps you should better use slurp module to register the content of the file and do some regexp to print what you want on it... https://docs.ansible.com/ansible/latest/modules/slurp_module.html#slurp-module Regards, Le 15/01/2020 à 06:34, Shifa Shaikh a écrit : I wish to search for

Re: [ansible-project] Gathering Facts hangs when using become

2020-01-13 Thread Jean-Yves LENHOF
Hi, Problems I already encounter : - NFS Stale - rpm database corruption - lock on lvm Regards, Jy Le 14 janvier 2020 00:46:56 GMT+01:00, Chris Thro a écrit : >Out of hundreds of hosts we have one host always hangs when gathering >facts >when using become. > >Create a playbook with the

Re: [ansible-project] Why doesn't this task to check when a server has booted work?

2020-01-07 Thread Jean-Yves LENHOF
Le 07/01/2020 à 22:55, RobertF a écrit : I have an Ansible playbook for creating [Linode](https://linode.com) servers.  The problem I'm having is that my playbook isn't able to determine when the new server is up.  I'm using Ansible 2.8.4.  My playbook is as follows:     ---     hosts:

Re: [ansible-project] Need help on building ansible inventory file properly

2019-12-30 Thread Jean-Yves LENHOF
Hi, It's difficult to understand what you want to do... Perhaps you should explain in plain english before trying to code it ? In your code, there's a "hosts" directive in your inventory You should not have it in this file ("hosts" directive is for playbooks) If you have multiple

Re: [ansible-project] Besoin d'aide pour Upgrade ansible

2019-12-12 Thread Jean-Yves LENHOF
, JYL Le 2019-12-12 16:15, krad imen a écrit : Bonjour; Pouvez vous m'aider pour faire la mise à jour d'ansible de 2.7 vers 2.9 svp. je n'ai pas trouver la procédure détaillée pour le faire. Merci par avance -- Jean-Yves LENHOF jean-y...@lenhof.eu.org Tel: 06 50 95 41 26 -- You received

Re: [ansible-project] Ansible seems not supporting fundemental user management commands in Arch Linux

2019-11-22 Thread Jean-Yves LENHOF
Hi, You did a mix between the user module and the group module parameters. Please read docs and samples : https://docs.ansible.com/ansible/latest/modules/group_module.html https://docs.ansible.com/ansible/latest/modules/user_module.html I think you should made a loop around group module to

Re: [ansible-project] Ansible Version Migration

2019-11-21 Thread Jean-Yves LENHOF
expect some work for your very old scripts using version 1.5... Regards, -- -- Jean-Yves LENHOF jean-y...@lenhof.eu.org Tel: 06 50 95 41 26 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

Re: [ansible-project] Running ansible playbook with different versions

2019-11-11 Thread Jean-Yves LENHOF
The keyword you are looking into is python virtualenv. Regards, Le 12 novembre 2019 07:20:44 GMT+01:00, Ganesh Biradar a écrit : >Is there any way to run different playbooks in the same directory with >different ansible versions using the ansible-playbook command? > >-- >You received this

Re: [ansible-project] When ansible supports rhel8

2019-05-27 Thread Jean-Yves LENHOF
Le 2019-05-27 06:00, Barun kumar a écrit : Hi Team, Any idea on ansible rhe 8 support? Regards, Barun Hi, Is this link helping you ? https://www.ansible.com/blog/integrating-ansible-and-red-hat-enterprise-linux-8-beta Regards, JYL -- You received this message because you are subscribed

Re: [ansible-project] i can't list object

2019-05-02 Thread Jean-Yves LENHOF
Le 02/05/2019 à 08:40, lander7...@gmail.com a écrit : Hi, i'm use this playbook --- - hosts: host1 gather_facts: false connection: local tasks:     - name: Gather fact datastore vmware_datastore_facts:   hostname: "{{ hostname }}"   username: "{{ username }}"   password: "{{ password }}"  

Re: [ansible-project] i can't list hard disk info

2019-05-02 Thread Jean-Yves LENHOF
Le 02/05/2019 à 09:02, lander7...@gmail.com a écrit : Hi, i use this playbook: --- - hosts: host1 gather_facts: false connection: local tasks: - name: Gather disk facts from virtual machine using name   vmware_guest_disk_facts:     # Unirse a vsphere     hostname: "{{ hostname }}"    

Re: [ansible-project] Ubuntu 19.04 Support

2019-04-20 Thread Jean-Yves LENHOF
Le 20/04/2019 à 10:48, Abdullah Medhat a écrit : Hello, When will the packages for Ubuntu 19.04 be available ? $ sudo apt update ... Err:8 http://ppa.launchpad.net/ansible/ansible/ubuntu disco Release   404  Not Found ... Reading package lists... Done E: The repository

Re: [ansible-project] Exceptions when trying to use apache2_mod_proxy

2019-03-28 Thread Jean-Yves LENHOF
Le 28/03/2019 à 17:05, Jeff Sondag a écrit : I'm trying to manage an apache load balancer with apache2_mod_proxy, and am getting the following error. If someone could help that would be very much appreciated. I've submitted it as a bug with more information, here. 

Re: [ansible-project] Exceptions when trying to use apache2_mod_proxy

2019-03-28 Thread Jean-Yves LENHOF
Le 28/03/2019 à 17:05, Jeff Sondag a écrit : I'm trying to manage an apache load balancer with apache2_mod_proxy, and am getting the following error. If someone could help that would be very much appreciated. I've submitted it as a bug with more information, here. 

Re: [ansible-project] ansible got stuck in remote password query?

2019-03-28 Thread Jean-Yves LENHOF
Le 28 mars 2019 14:01:30 GMT+01:00, Harald Dunkel a écrit : >You mean, you hardwire "systemd-only" into your playbooks? Or >do you explicitly list the systemd hosts in your inventory file, >making sure the general service module isn't used by accident? > >Ansible is very new to me, but I had

Re: [ansible-project] Nmcli module static routes

2019-03-28 Thread Jean-Yves LENHOF
Le 25/03/2019 à 18:43, anil kumar a écrit : Hi, Dont see any documentation regarding adding static routes using nmcli modules. Is it feasible to add static routes, if yes please let me know and sample example would help. Hi, What OS are you using ? On RedHat/CentOS, why not using

Re: [ansible-project] repo error

2019-03-28 Thread Jean-Yves LENHOF
Le 28/03/2019 à 11:03, Pierre Ochsenbein a écrit : Hi guys I have this error when I execute my playbook. TASK [Stage 1: install repository package - postgresql_repo_CentOS]

  1   2   >