Re: [ansible-project] Identify most recent directory in a directory.

2022-12-22 Thread Thanh Nguyen Duc
I don’t think you can achieve what you want if the file keep generating. Ansible is not real time monitor/scanning. The most recently at the point of time when you trigger only. Thanks and Best Regards, Thanh. > On 23 Dec 2022, at 11:55, Nico Kadel-Garcia wrote: > > On Thu, Dec 1, 2022 at

[ansible-project] Re: win_package how can it know package has been installed when product_id is not specified

2022-12-22 Thread jbor...@gmail.com
If it's an msi, the module can scan the package itself to get the product_id. If it's an exe then it would need the product_id or one of the creates_* options to try and add some idempotency. On Friday, December 23, 2022 at 12:24:04 PM UTC+10 pyyg...@gmail.com wrote: > Hi everyone, > > About wi

Re: [ansible-project] Identify most recent directory in a directory.

2022-12-22 Thread Nico Kadel-Garcia
On Thu, Dec 1, 2022 at 7:10 PM Vladimir Botka wrote: > > Use Ansible module *find* and sort the directories by *ctime*. For > example, given the tree This is only reliable if nothing else writes anything else in that tree between the first command, tand the "tree" command. > shell> tree /tmp/te

Re: [ansible-project] Python venv, Error " Ansible could not initialize the preferred locale "

2022-12-22 Thread Nico Kadel-Garcia
Activating venv environments is a bit of a shoot, if you're been getting clever or cute with your PATH. I don't recommend using it. Instead, urge using this: pip3 install ansible-core --user Note the use of the "--user" option, which puts things fairly consistently in $HOME/.local and as

[ansible-project] win_package how can it know package has been installed when product_id is not specified

2022-12-22 Thread Alex Lu
Hi everyone, About win_package, in the official document, it mentions: product_id value is ignored if path is set to a local accesible file path and the package is not an exe. So, if I want to install MSI package, and I specify the path to a local accessible file path, then I don't need to set

[ansible-project] Python venv, Error " Ansible could not initialize the preferred locale "

2022-12-22 Thread Por
Hi, is there who is like me? I've tried ``` shell python3 -m venv venv # and activate it # then pip install ansible # pip in virtualenv not seems to support "--user" option # run ansible ansible ``` ``` shell # error "Ansible could not initialize the preferred locale: unsupported locale sett

Re: [ansible-project] Add Servers to Server Manager using PowerShell

2022-12-22 Thread Amitabh Ghosh
The user is a domain administrator as well as local administrator to the remote machine. On Friday, December 23, 2022 at 12:55:17 AM UTC+5:30 dnmv...@gmail.com wrote: > Permissions ? > > On Thu, 22 Dec 2022 at 17:42, Amitabh Ghosh wrote: > >> I guess it's still the same thing: >> >> *Playbook:

Re: [ansible-project] Add Servers to Server Manager using PowerShell

2022-12-22 Thread Dick Visser
Permissions ? On Thu, 22 Dec 2022 at 17:42, Amitabh Ghosh wrote: > I guess it's still the same thing: > > *Playbook:* > ansible.windows.win_powershell: > script: | > try { > Get-Process | Where-Object {$_.ProcessName -eq > "ServerManager.exe"} | Stop-Process -Fo

Re: [ansible-project] Re: using register stdout_lines in with_items loop

2022-12-22 Thread David Gorsett
This page was the starting point of me figuring out how to print the 'results[*].stdout_lines' of a registered return value. So, I thought I ought to share what I found to work, as it's quite short and re-usable with any return value that produces a list. It also provides flexibility to add mor

Re: [ansible-project] Abridged summary of ansible-project@googlegroups.com - 8 updates in 3 topics

2022-12-22 Thread Kannappan M
Hi All Am using rhel8 and installed the 2.13.3 but not able to edit the /etc/ansible/hosts can some one assist me on this and also any cheetsheet for ansible-config On Thu, Dec 22, 2022, 20:40 wrote: > ansible-project@googlegroups.com >

Re: [ansible-project] Add Servers to Server Manager using PowerShell

2022-12-22 Thread Amitabh Ghosh
I guess it's still the same thing: *Playbook:* ansible.windows.win_powershell: script: | try { Get-Process | Where-Object {$_.ProcessName -eq "ServerManager.exe"} | Stop-Process -Force $file = Get-Item "$env:USERPROFILE\AppData\Roaming\Microsoft\

[ansible-project] Proxy SG (Blue Coat) enable mode

2022-12-22 Thread vi1...@gmail.com
Dear all, Does anybody know how to perform the privilege escalation to "enable" in Proxy SG via Ansible? I have tried the following code, with no luck: OS = JUNOS because I could not find SG OS and somebody told us to use "junos" instead. It works to launch regular commands but It does not

Re: [ansible-project] Re: Overriding detected file kind 'yaml' with 'playbook' for given positional argument

2022-12-22 Thread Will McDonald
There's a little more info on why this behaviour occurs here: https://github.com/ansible/ansible-lint/issues/1398 The shell return value is accurate regardless: [wmcdonald@fedora tests]$ ll total 4 -rw-r--r--. 1 wmcdonald wmcdonald 143 Dec 22 12:55 test1.yaml [wmcdonald@fedora tests]$ cat test1.y

[ansible-project] Re: Overriding detected file kind 'yaml' with 'playbook' for given positional argument

2022-12-22 Thread Todd Lewis
Not possible to omit generating those messages, although you could say $ ansible-lint […] 2>/dev/null If the positional argument were, say, a group_vars file and it was being linted as if it were a playbook, then "WARNING …" would clearly make sense. Or if you didn't intend "my_test.yml" to be

[ansible-project] Re: Overriding detected file kind 'yaml' with 'playbook' for given positional argument

2022-12-22 Thread rajthecomputerguy
It is a warning , can you please tell me how to avoid this? *WARNING Overriding detected file kind 'yaml' with 'playbook' for given positional argument: my_test.yml* On Thursday, December 22, 2022 at 5:22:50 PM UTC+5:30 uto...@gmail.com wrote: > That isn't an error. It's just information: the

[ansible-project] Re: Overriding detected file kind 'yaml' with 'playbook' for given positional argument

2022-12-22 Thread Todd Lewis
That isn't an error. It's just information: the yaml file is being treated as a playbook. On Thursday, December 22, 2022 at 5:40:02 AM UTC-5 rajthecomputerguy wrote: > Hi Team, > > I am facing below error while doing ansible-lint, Any help would be > appreciated > > command: *ansible-lint test

[ansible-project] Overriding detected file kind 'yaml' with 'playbook' for given positional argument

2022-12-22 Thread rajthecomputerguy
Hi Team, I am facing below error while doing ansible-lint, Any help would be appreciated command: *ansible-lint test.yaml* *Overriding detected file kind 'yaml' with 'playbook' for given positional argument* Thanks, Raj -- You received this message because you are subscribed to the Google