)]}'
{"_skeleton_role_/tasks/main.yml.j2":[{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"44c0b9cb14eadad8089aa7c961126cdf510eab50","unresolved":false,"context_lines":[{"line_number":21,"context_line":"- name: Load operating system specific variables v2"},{"line_number":22,"context_line":"  include_vars: \"{{ item }}\""},{"line_number":23,"context_line":"  failed_when: false"},{"line_number":24,"context_line":"  loop:"},{"line_number":25,"context_line":"      - \"family-{{ ansible_os_family | lower }}.yml\""},{"line_number":26,"context_line":"      - \"family-{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml\""},{"line_number":27,"context_line":"      - \"{{ ansible_distribution | lower | replace(\u0027 \u0027, \u0027-\u0027) }}.yml\""}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"7faddb67_30940136","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":7},"updated":"2019-08-16 19:34:52.000000000","message":"this will load all variable files found in the vars path. Making it possible that one var which meets the current criteria will overwrite another in a different file should the variable pattern match. In terms of operating system specific variables only one file should be loaded when found. Other var files can be loaded within the role using task logic as required.","commit_id":"87a8a6fc343cb626dadb8d509fdd4343f241919f"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"0b1163fb909d4dc75b82ff9dac91a3ba1acfc172","unresolved":false,"context_lines":[{"line_number":21,"context_line":"- name: Load operating system specific variables v2"},{"line_number":22,"context_line":"  include_vars: \"{{ item }}\""},{"line_number":23,"context_line":"  failed_when: false"},{"line_number":24,"context_line":"  loop:"},{"line_number":25,"context_line":"      - \"family-{{ ansible_os_family | lower }}.yml\""},{"line_number":26,"context_line":"      - \"family-{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml\""},{"line_number":27,"context_line":"      - \"{{ ansible_distribution | lower | replace(\u0027 \u0027, \u0027-\u0027) }}.yml\""}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"7faddb67_885c9e7d","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":7},"in_reply_to":"7faddb67_258833c4","updated":"2019-08-19 12:49:33.000000000","message":"I\u0027m not sure the bug you mentioned is something we\u0027d experience. The with_first_round for operating system related variable files is something that we\u0027ve been using for years so I\u0027m positive there are no issues with it.\n\nIn terms of variable mashing, I\u0027m sure there are plenty of places where this works just fine, however, its something that can be misused, and I\u0027d like to ensure we\u0027re not introducing a new foot-gun. If we\u0027re loading shadow variables, we should set a default in defaults/main.yml and load OS specific variables in vars/\u003c\u003cOS-FILE\u003e\u003e. Then its clear that an option can be overridden by the user but otherwise OS defined.\n\nI believe we may be overthinking how many files we\u0027ll have per-OS. I could see us redefining things a couple times for something like RHEL7,8 maybe Fedora28,30,etc, but in most cases these values will all be the same, and having clear OS specific values, even if they\u0027re repeated is better than having obscure, or otherwise, assumed values. My general mantra is that Ansible is NOT a programming language and should not be treated as such. We should always strive to be DRY, however, its not practical in Ansible and I believe creating this pattern at scale will cause more problems than its worth.","commit_id":"87a8a6fc343cb626dadb8d509fdd4343f241919f"},{"author":{"_account_id":24162,"name":"Sorin Sbârnea","display_name":"zbr","email":"ssbarnea@redhat.com","username":"ssbarnea","status":"do not feed the troll 🥕"},"change_message_id":"5f3cdf373a97da9024476c19bb667110f30bc96e","unresolved":false,"context_lines":[{"line_number":21,"context_line":"- name: Load operating system specific variables v2"},{"line_number":22,"context_line":"  include_vars: \"{{ item }}\""},{"line_number":23,"context_line":"  failed_when: false"},{"line_number":24,"context_line":"  loop:"},{"line_number":25,"context_line":"      - \"family-{{ ansible_os_family | lower }}.yml\""},{"line_number":26,"context_line":"      - \"family-{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml\""},{"line_number":27,"context_line":"      - \"{{ ansible_distribution | lower | replace(\u0027 \u0027, \u0027-\u0027) }}.yml\""}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"7faddb67_258833c4","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":7},"in_reply_to":"7faddb67_30940136","updated":"2019-08-19 11:46:46.000000000","message":"Are you aware of a bug regarding location looked because documentation is very clear regarding where it loads stuff from when run inside the role: https://docs.ansible.com/ansible/latest/modules/include_vars_module.html\n\nI already used this pattern in multiple places and did not spot any misbehavors.\n\nThe overlay loading is by desig: intended behavior as it allows to define values in minimal number of places.\n\nThe precedence order of the files is key here, the most specific ones are loaded last because if a variable is defined in multiple places the value that will win is the one in the most specific place.\n\nWe do want to avoid the case where adding a new variable that applies to all redhat distributions would need to be added identically to 10-15 files.\n\nA variable should be defined only at the place where it diverges from its parent. It like inheritance.","commit_id":"87a8a6fc343cb626dadb8d509fdd4343f241919f"}]}
