What does this pipe mean?

In indispensable, I can use something like:

debug:var="{{lookup('pipe', 'date +%Y%m%d')}}"

It may work, but what does “pipe” mean? cannot find a detailed explanation for this in a non-document, you want to understand what will happen when this statement starts.

For example, "date" means running the command "date" from the shell? and then use the tubular way to format the date in this way?

+4
source share
1 answer

pipe- this is an indispensable lookup plugin that will calculate the output of the shell command that you specify in the second search parameter and lay it in the left side of your search. You can specify any shell command.

date +%Y%m%d , var - .

pipe lookup, timestamp, , :

- set_fact: timestamp="{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}"

Lookups , pipe.

+9

Source: https://habr.com/ru/post/1654949/


All Articles