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

1 Answer

0 votes

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.



fact_time: “Truth: ”

troubleshoot: var=fact_time

order: rest 2

troubleshoot: var=fact_time


name: queries in factors versus queries in realities

has: localhost


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