>From memory and untested:
- name: “do grep to get a name”
command:
cmd=“grep ssh {{pgconfiguration}}”
register: grep
- name: “set the filename”
setfact:
filename=grep.stdout
...
> On Oct 21, 2022, at 10:07, dulhaver via Ansible Project
> <[email protected]> wrote:
>
> I want to create a file based on a grep result of another file on the host
> It can be achieved with a shell TASK I believe ...
>
> - name: create 10-ssl.conf based on old postgresql.conf
> ansible.builtin.shell:
> cmd: grep ssh /var/lib/pgsql/13/data/postgresql.conf >
> /var/lib/pgsql/14/data/conf.d/10-ssl.conf
>
> ... but am wondering whether there was a more anible-ish way to approach this
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/0f7ab823-cc9d-b194-5b69-eb347578fcf7%40mailbox.org
>
> <https://groups.google.com/d/msgid/ansible-project/0f7ab823-cc9d-b194-5b69-eb347578fcf7%40mailbox.org?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/8D334243-67EE-493B-AEEA-81CCF69054B4%40gmail.com.