cjnovak98 / ocp4-disconnected-collection

0 stars 1 forks source link

Revamp: Need to add default vars/static vars directly to role variables vs using group_vars/static.yml #10

Closed cjnovak98 closed 1 month ago

cjnovak98 commented 1 month ago

As stated above, any vars defined in a roles tasks.yml or templates should either have a default var or static vars defined. (role/default and role/vars respectively)

cjnovak98 commented 1 month ago

See the following link for an example role written by @geerlingguy https://github.com/geerlingguy/ansible-role-apache/blob/f2b91ac84001db3fd4b43306a8f73f1a54f96f7d/vars/Debian.yml#L8

cjnovak98 commented 1 month ago

Also Ansible best practice here: https://redhat-cop.github.io/automation-good-practices/#_vars_vs_defaults