I'm sorry but I don't understand.
What you describe sounds exactly like what a simple template task would do?
On Thu, 23 Mar 2023 at 07:57, Hiero-nymo wrote:
>
> When something is added to the template then the file will be updated
> accordely but if you removed by example some parameters in
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
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?
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",
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
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:
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