in DevOps by
Q:
What is the distinction among set_fact and vars in ansible?

▼ Show 1 Answer

0 votes
by

Where a set_fact sets the incentive for a factor at one time and stays static, despite the fact that the esteem is very powerful and vars continue changing according to the esteem continues changing for the variable.

assignments:

set_fact:

fact_time: “Truth: ”

troubleshoot: var=fact_time

order: rest 2

troubleshoot: var=fact_time

assignments:

name: queries in factors versus queries in realities

has: localhost

vars:

var_time: “Var: ”

Despite the fact that the query for the date has been utilized in both the cases, wherein the vars are utilized it modifies dependent on an opportunity to time each time executed inside the playbook lifetime. Be that as it may, Fact dependably continues as before once query is finished

DevOps
Learn More with Madanswer

Related questions

0 votes
asked Dec 1, 2019 in DevOps by SakshiSharma
...