Re: [ansible-project] How to get a list of dict with a cat from command module

2023-03-22 Thread Hiero-nymo
When something is added to the template then the file will be updated accordely but if you removed by example some parameters in template then nothing happens in the file. The goal is to compare the file and template to see if something has changed and finally modified it. The template must be

[ansible-project] Ansible + Arista + Netbox

2023-03-22 Thread Ben Jones
Hello! this might be quite specific, but I'm loosing the will... We're trying to automate our switch configuration using Ansible with Netbox providing the configurations. I've got a dynamic inventory xml which is generated by querying Netbox via the Rest API based on tags. I want the playboo

[ansible-project] Conditionals within roles

2023-03-22 Thread Chip Burke
I have a playbook with a role - hosts: somehost roles: - role: community.some.role hostname: "{{ansible_hostname}}" server: 192.168.1.2 api_server_url: https://some.server.com url_path: /api api_use_ssl: yes userparameters: - name: SomeName The la

Re: [ansible-project] azure_rm_resourcegroup_info usage help

2023-03-22 Thread Shawn Singh
I opened an issue with the github project. Short answer, I needed to force upgrade azure/azcollection from 1.14 to 1.15. For more detail: https://github.com/ansible-collections/azure/issues/ Thanks, Shawn On Wednesday, March 15, 2023 at 1:19:54 PM UTC-4 Shawn Singh wrote: > I'm reading t

Re: [ansible-project] How to get a list of dict with a cat from command module

2023-03-22 Thread Dick Visser
On Wed, 22 Mar 2023 at 16:37, Hiero-nymo wrote: > > The goal is to compare 2 files. The content of a file with a template file. Comparing two files (one of them is already an ansible template?) is not a goal, but rather an intermediate step. What will you do with the result of this comparison? I

Re: [ansible-project] How to get a list of dict with a cat from command module

2023-03-22 Thread Hiero-nymo
The goal is to compare 2 files. The content of a file with a template file. First I'm trying to get the content of file then the template file and at the end I'll do the comparaison. So, here's the result of my cat command: [...] "stdout_lines": [ "# Ansible managed", "

Re: [ansible-project] How to get a list of dict with a cat from command module

2023-03-22 Thread 'Rowe, Walter P. (Fed)' via Ansible Project
If the file content is JSON data you need to read it like JSON data. Walter -- Walter Rowe, Division Chief Infrastructure Services, OISM Mobile: 202.355.4123 On Mar 22, 2023, at 10:17 AM, Dick Visser wrote: On Wed, 22 Mar 2023 at 15:02, Hiero-nymo mailto:jer.m.me...@gmail.com>> wrote: Hi eve

Re: [ansible-project] How to get a list of dict with a cat from command module

2023-03-22 Thread Dick Visser
On Wed, 22 Mar 2023 at 15:02, Hiero-nymo wrote: > Hi everyone, > > I'm using the cat command with the command module to retrieve remote files > content. With a loop within a find module I get filename and call a task, > so like this: > [...] > - name: Read the content of all files > command: /u

[ansible-project] How to get a list of dict with a cat from command module

2023-03-22 Thread Hiero-nymo
Hi everyone, I'm using the cat command with the command module to retrieve remote files content. With a loop within a find module I get filename and call a task, so like this: [...] - name: Read the content of all files command: /usr/bin/cat {{ _files_folder.path }}/{{ file_item }}.yaml regi

[ansible-project] Re: Problem with file transfer

2023-03-22 Thread 'Axel Kurowski' via Ansible Project
I have found the error.. I have registered manually the public key from root host1 into the target user host2. It works fine. wtorek, 21 marca 2023 o 11:25:39 UTC+1 Axel Kurowski napisał(a): > Hello, > > I have two hosts and I would like to transfer a file between them. > So I have the *file.