On 25. okt. 2017 14:14, Josu Vilda wrote:
> I would like to get a 3 digit random number, for example 001.
> I have come to get:
>
> tasks:
> - name: We assign a fixed random variable throughout the execution.
> set_fact:
> Random_Fix: "{{ 100 | random }}"
> run_once: yes
>
> ¿Which language uses "{{100 | random}}" or where can I find reference for
> this language?
In Ansible {{ }} indicate templating, "language" is Jinja[1].
Ansible extend Jinja with some custom filters[2] and replaces some of the
default filters in Jinja, random is such a filter.
[1] jinja.pocoo.org/docs/dev/templates/
[2] https://docs.ansible.com/ansible/latest/playbooks_filters.html
--
Kai Stian Olstad
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/a1d510a6-f9fb-4f5b-5ed5-903908459735%40olstad.com.
For more options, visit https://groups.google.com/d/optout.