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