Re: [ansible-project] encrypted password hash question

2020-12-17 Thread Stefan Hornburg (Racke)
On 12/16/20 8:56 PM, Rene Paquin wrote: > Hi.  New ansible user here so just starting out.  My first experiment is to > create a user with sudo privileges on an > Oracle Linux 8 server in my test environment.  Here are the contents of the > files in the /home/”user”/ansible/playbooks > folder.  I

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 b

Re: [ansible-project] Need to enter chroot on remote host

2020-12-17 Thread Mathias Jung
anyone out there who can help me out? Mathias Jung schrieb am Dienstag, 15. Dezember 2020 um 12:33:22 UTC+1: > Hello Dick, > > thank you for the link! > I think i'm too much beginner - i do not know how to use it :-( > Do you have an example for the plugin? > > dick@geant.org schrieb am Diens

[ansible-project] Multiple values for ansible connection properties

2020-12-17 Thread Ivan Labrovic
Has anyone heard of providing a second --user/--privatekey to ansible-playbook command, just in case the first user/privkey authentication fails? Seem to remember something about this in an Ansible session on the RHEl summit last year. regards, Ivan. -- You received this message because you a

[ansible-project] Re: Multiple values for ansible connection properties

2020-12-17 Thread Ivan Labrovic
some background on why I could use this is: configuring systems pre-deployed on different cloud providers, on one if need to start with 'root' to create the ansible user, on the other i dont have root, but it's 'localadmin') Now i have build a script around ansible-playbook, to determine on whic

Re: [ansible-project] Re: Multiple values for ansible connection properties

2020-12-17 Thread Stefan Hornburg (Racke)
On 12/17/20 1:44 PM, Ivan Labrovic wrote: > some background on why I could use this is: configuring systems pre-deployed > on different cloud providers, on one if > need to start with 'root' to create the ansible user, on the other i dont > have root, but it's 'localadmin') > Now i have build a s

Re: [ansible-project] Re: Multiple values for ansible connection properties

2020-12-17 Thread Ivan Labrovic
Thanks Racke, yes i thought about this. This would require me to split the hosts in multiple groups (lets say: grp_VMWare, grp_MSAzure, grp_OracleCloud etc) And that would require some more administration, Thanks for the tip, this will keep me thinking some more about this suggestion, while wai

RE: [ansible-project] Re: Multiple values for ansible connection properties

2020-12-17 Thread Rene Paquin
Thank you for the response. However, I have tried with quotes, without quotes, encrypted, decrypted, hashed, unhashed, it just does not seem to work. Rene From: ansible-project@googlegroups.com On Behalf Of Ivan Labrovic Sent: December 17, 2020 8:01 AM To: Ansible Project Subject: Re: [ansi

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

2020-12-17 Thread Matt Martz
We have no current plans of dropping Python 2 support for modules in the near future. With EL 7 EOL scheduled for 2024, it's possible that we continue python2 support for modules until then. On Thu, Dec 17, 2020 at 1:58 AM Onno wrote: > Hi all, > I stumbled onto the problem > If you require Pyt

[ansible-project] Re: Need help with Loop and Stat playbook

2020-12-17 Thread Roberto Paz
Maybe some of the files are missing in the target. If that's the case, there is no "stat" for that file. Maybe you should add "audit_tools.stat is defined and audit_tools.stat.mode != '0755'" El miércoles, 16 de diciembre de 2020 a la(s) 17:09:12 UTC-6, thuan...@gmail.com escribió: > Hi all, >

[ansible-project] Re: gather facts fails when inventory contains vault variable

2020-12-17 Thread Roberto Paz
Have you stored the variables in the vault file as ?: vault_root_user: x vaule_root_password: y El miércoles, 16 de diciembre de 2020 a la(s) 12:30:25 UTC-6, umesha...@gmail.com escribió: > Hi All, > > With the following inventory file, gather facts gives error. The > inventory fi

Re: [ansible-project] Re: Need help with Loop and Stat playbook

2020-12-17 Thread Stefan Hornburg (Racke)
On 12/17/20 5:05 PM, Roberto Paz wrote: > Maybe some of the files are missing in the target. If that's the case, there > is no "stat" for that file. > That's not true. If a file is missing you have stat.exists = false in the result. The problem here is that the stat task is called in a loop, w

[ansible-project] Trouble with win_chocolatey and OpenSSH

2020-12-17 Thread shad...@gmail.com
I'm using OpenSSH to connect to Windows boxes to avoid having to deal with WinRM. So far it is working pretty good, but I have found an issue and i'm hoping someone has an idea. This is what my tasks looks like: - name: install chocolatey win_chocolatey: name: chocolatey state: prese

RE: [ansible-project] Trouble with win_chocolatey and OpenSSH

2020-12-17 Thread Stuart Lowe
Can you run Refreshenv Between the 2? From: ansible-project@googlegroups.com On Behalf Of shad...@gmail.com Sent: 17 December 2020 16:48 To: Ansible Project Subject: [ansible-project] Trouble with win_chocolatey and OpenSSH I'm using OpenSSH to connect to Windows boxes to avoid having to dea

RE: [ansible-project] Trouble with win_chocolatey and OpenSSH

2020-12-17 Thread Stuart Lowe
Or $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") Some other ideas here : https://stackoverflow.com/questions/17794507/reload-the-path-in-powershell From: ansible-project@googlegroups.com On Behal

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

2020-12-17 Thread aidewuado
You can update python to v3 in centos7 Enviado desde mi iPhone > El 17-12-2020, a la(s) 04:57, Onno escribió: > >  > Hi all, > I stumbled onto the problem > If you require Python 3 support use the `dnf` Ansible module instead." > > This message baffles me. It has for some time and I do not un

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

2020-12-17 Thread Matt Martz
While you can install python3 on CentOS, they do not provide yum or selinux python bindings for Python3. Which makes it not totally useful in the context of many things done via Ansible. In short, you generally need to use the system python for many operations. Red Hat, and by extension CentOS w

Re: [ansible-project] Re: gather facts fails when inventory contains vault variable

2020-12-17 Thread Umesha A
No. As root_user and root_password On Thu, 17 Dec 2020, 11:12 Roberto Paz, wrote: > Have you stored the variables in the vault file as ?: > vault_root_user: x > vaule_root_password: y > > El miércoles, 16 de diciembre de 2020 a la(s) 12:30:25 UTC-6, > umesha...@gmail.com escribió: > >>

RE: [ansible-project] encrypted password hash question

2020-12-17 Thread Rene Paquin
Further to this.. I found that when using this statement in the playbook it is not grabbing the variable in the group_vars/ol8 file but actually passing password as password despite the removal of quotes. Just wondering if I am missing to declare something? password: "{{ password | password

Re: [ansible-project] encrypted password hash question

2020-12-17 Thread Joseph Alexander
I always find that behavior gets tricky when using key words as variables. Try changing password to pwd or passwd. On Thu, Dec 17, 2020 at 2:51 PM Rene Paquin wrote: > Further to this.. > > I found that when using this statement in the playbook it is not grabbing > the variable in the group_vars

Re: [ansible-project] Re: Need help with Loop and Stat playbook

2020-12-17 Thread Thuan
Hi all, So I made a slight chance, I added "failed_when: audit_tools.stat.mode != '0755'' below 'register' module and the error message went away. By the way, all files are exist. I changed two files chmod to 0640 for testing purpose. However, I still get the 'Passed' as a result when I ran the -

RE: [ansible-project] encrypted password hash question

2020-12-17 Thread Rene Paquin
Thanks for the suggestion. This just leads to more…. When I use this password: "{{ passwrd | password_hash('sha512', 'A512') }}" I get the following error: TASK [Create Users Task] ** fatal: [qreneansi

Re: [ansible-project] Re: Need help with Loop and Stat playbook

2020-12-17 Thread Thuan
Another issue, when all the files have proper permissions, then the playbook would give me the result as 'Failed.' This is the opposite of what I want. TASK [debug] *** ok: [localhost] => { "msg": "V-

Re: [ansible-project] encrypted password hash question

2020-12-17 Thread Joseph Alexander
and of course you also set the new passwrd variable? Its not null or empty? On Thu, Dec 17, 2020 at 3:25 PM Rene Paquin wrote: > Thanks for the suggestion. This just leads to more…. > > > > When I use this > > password: "{{ passwrd | password_hash('sha512', 'A512') }}" I get the > following er

RE: [ansible-project] encrypted password hash question

2020-12-17 Thread Rene Paquin
I did. The contents of the encrypted file are: admin_group: wheel passwrd: #G00d4now Rene From: ansible-project@googlegroups.com On Behalf Of Joseph Alexander Sent: December 17, 2020 3:32 PM To: ansible-project@googlegroups.com Subject: Re: [ansible-project] encrypted password hash question

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

2020-12-17 Thread Kevin Fenzi
On Wed, Dec 16, 2020 at 11:57:49PM -0800, Onno wrote: ...snip... > > Is my understanding correct that CentOS 7 is EOF jan 2020 if you want > Python3? Python3 implies CentOS 8 or higher? Well, I think it's more nuanced than that. CentOS/RHEL7 now does have python3.6 shipped with it, but of course

Re: [ansible-project] encrypted password hash question

2020-12-17 Thread Joseph Alexander
try removing the # from the password and see if that makes a difference On Thu, Dec 17, 2020 at 3:37 PM Rene Paquin wrote: > I did. The contents of the encrypted file are: > > > > admin_group: wheel > > passwrd: #G00d4now > > > > Rene > > > > > > *From:* ansible-project@googlegroups.com > *On

Re: [ansible-project] Trouble with win_chocolatey and OpenSSH

2020-12-17 Thread shad...@gmail.com
Running refreshenv in powershell via win_shell: The term 'Refreshenv' is not recognized as the name of a cmdlet, function, script file or operable program. According to this: https://stackoverflow.com/questions/46758437/how-to-refresh-the-environment-of-a-powershell-session-after-a-chocolatey-i

[ansible-project] Ansible 2.8.2 - yum list of local packages

2020-12-17 Thread Ty Smith
I get a deprecation warning when running the below task when using yum module with local install. The variable "packages" comes from vars/centos_6.yml * This Works but provides deprecated warning * - name: Include vars for host distribution include_vars: "{{ ansible_distribution|lower