Categories

Dec 5, 2019 in DevOps

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

1 Answer

Dec 5, 2019

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

Click here to read more about DevOps
Click here to read more about Insurance

Related questions

Madanswer
Dec 1, 2019 in DevOps
Mar 9 in DevOps
Jul 13, 2019 in Regression Analysis Q&A
...