)]}'
{"ansible/roles/baremetal/tasks/post-install.yml":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"6a2c184f8aa91b27b14f332442b47a49daf24627","unresolved":true,"context_lines":[{"line_number":166,"context_line":"    - apparmor_libvirtd_profile.stat.exists"},{"line_number":167,"context_line":"    - not apparmor_libvirtd_disable_profile.stat.exists"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"- name: Get stat of chronyd apparmor profile"},{"line_number":170,"context_line":"  stat:"},{"line_number":171,"context_line":"    path: /etc/apparmor.d/usr.sbin.chronyd"},{"line_number":172,"context_line":"  register: apparmor_chronyd_profile"},{"line_number":173,"context_line":"  when:"},{"line_number":174,"context_line":"    - ansible_os_family \u003d\u003d \"Debian\""},{"line_number":175,"context_line":"    - enable_chrony | bool"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"- name: Get status of chronyd apparmor profile"},{"line_number":178,"context_line":"  command: apparmor_status --json"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"d1596f4f_8f8d5936","line":175,"range":{"start_line":169,"start_character":0,"end_line":175,"end_character":26},"updated":"2021-02-18 09:28:46.000000000","message":"Is this check still useful?","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"},{"author":{"_account_id":33105,"name":"Ana Peric","email":"anaperic@gmail.com","username":"anperic"},"change_message_id":"7454512bba9238f1dd4aad7415488414dccf4039","unresolved":true,"context_lines":[{"line_number":166,"context_line":"    - apparmor_libvirtd_profile.stat.exists"},{"line_number":167,"context_line":"    - not apparmor_libvirtd_disable_profile.stat.exists"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"- name: Get stat of chronyd apparmor profile"},{"line_number":170,"context_line":"  stat:"},{"line_number":171,"context_line":"    path: /etc/apparmor.d/usr.sbin.chronyd"},{"line_number":172,"context_line":"  register: apparmor_chronyd_profile"},{"line_number":173,"context_line":"  when:"},{"line_number":174,"context_line":"    - ansible_os_family \u003d\u003d \"Debian\""},{"line_number":175,"context_line":"    - enable_chrony | bool"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"- name: Get status of chronyd apparmor profile"},{"line_number":178,"context_line":"  command: apparmor_status --json"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"c50bba06_be67d136","line":175,"range":{"start_line":169,"start_character":0,"end_line":175,"end_character":26},"in_reply_to":"8ca7f748_830ce1d6","updated":"2021-02-19 21:25:19.000000000","message":"Coming to think of it, it is safer to leave this check in place.\nBy leaving it we will make sure first to:\n- when we parse the apparmor status: apparmor is enabled\n- there is a profile for chronyd\nand the only reason why we then need a check of the profile itself is to say if apparmour has the profile deleted (-R ran already once/or was never there), or not.\n\nThus keeping this will safe-guard us before we come into json parsing at all. Hope this makes sense.","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"},{"author":{"_account_id":33105,"name":"Ana Peric","email":"anaperic@gmail.com","username":"anperic"},"change_message_id":"73c99923f4e51a11cf05cbf941dc406badf85d37","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    - apparmor_libvirtd_profile.stat.exists"},{"line_number":167,"context_line":"    - not apparmor_libvirtd_disable_profile.stat.exists"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"- name: Get stat of chronyd apparmor profile"},{"line_number":170,"context_line":"  stat:"},{"line_number":171,"context_line":"    path: /etc/apparmor.d/usr.sbin.chronyd"},{"line_number":172,"context_line":"  register: apparmor_chronyd_profile"},{"line_number":173,"context_line":"  when:"},{"line_number":174,"context_line":"    - ansible_os_family \u003d\u003d \"Debian\""},{"line_number":175,"context_line":"    - enable_chrony | bool"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"- name: Get status of chronyd apparmor profile"},{"line_number":178,"context_line":"  command: apparmor_status --json"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"1585826b_7b0dc864","line":175,"range":{"start_line":169,"start_character":0,"end_line":175,"end_character":26},"in_reply_to":"c50bba06_be67d136","updated":"2021-02-24 09:26:54.000000000","message":"Done","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"},{"author":{"_account_id":33105,"name":"Ana Peric","email":"anaperic@gmail.com","username":"anperic"},"change_message_id":"6ec42a18a1ff5705d2416d65dc512ad0a673853f","unresolved":true,"context_lines":[{"line_number":166,"context_line":"    - apparmor_libvirtd_profile.stat.exists"},{"line_number":167,"context_line":"    - not apparmor_libvirtd_disable_profile.stat.exists"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"- name: Get stat of chronyd apparmor profile"},{"line_number":170,"context_line":"  stat:"},{"line_number":171,"context_line":"    path: /etc/apparmor.d/usr.sbin.chronyd"},{"line_number":172,"context_line":"  register: apparmor_chronyd_profile"},{"line_number":173,"context_line":"  when:"},{"line_number":174,"context_line":"    - ansible_os_family \u003d\u003d \"Debian\""},{"line_number":175,"context_line":"    - enable_chrony | bool"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"- name: Get status of chronyd apparmor profile"},{"line_number":178,"context_line":"  command: apparmor_status --json"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"8ca7f748_830ce1d6","line":175,"range":{"start_line":169,"start_character":0,"end_line":175,"end_character":26},"in_reply_to":"d1596f4f_8f8d5936","updated":"2021-02-18 12:31:19.000000000","message":"I will say not in debian 10 that has it enabled by default. What I am not 100% sure is what is happening with previous versions that do not have this by default and not even have chrony by default (but ntp I guess). In that case we will still fail on the apparmor_status --json parsing and will skip removal anyway.\nSo I guess we could totally get rid of this and also the corresponding when condition.","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"6a2c184f8aa91b27b14f332442b47a49daf24627","unresolved":true,"context_lines":[{"line_number":174,"context_line":"    - ansible_os_family \u003d\u003d \"Debian\""},{"line_number":175,"context_line":"    - enable_chrony | bool"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"- name: Get status of chronyd apparmor profile"},{"line_number":178,"context_line":"  command: apparmor_status --json"},{"line_number":179,"context_line":"  become: True"},{"line_number":180,"context_line":"  register: apparmor_status"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"84422ac6_dbc95517","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":46},"updated":"2021-02-18 09:28:46.000000000","message":"Get apparmor status\n\nCould you also move to L149 and use the same logic for the libvirt profile?","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"399c81d10aaa6e53a5c0c8f157e296104701a5d3","unresolved":true,"context_lines":[{"line_number":174,"context_line":"    - ansible_os_family \u003d\u003d \"Debian\""},{"line_number":175,"context_line":"    - enable_chrony | bool"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"- name: Get status of chronyd apparmor profile"},{"line_number":178,"context_line":"  command: apparmor_status --json"},{"line_number":179,"context_line":"  become: True"},{"line_number":180,"context_line":"  register: apparmor_status"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"513e14b9_7b6faf2b","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":46},"in_reply_to":"4dcbf73d_e4111e8e","updated":"2021-02-22 10:31:23.000000000","message":"Let\u0027s do it in one change and try to keep the logic as close as possible for libvirt and chrony.","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"},{"author":{"_account_id":33105,"name":"Ana Peric","email":"anaperic@gmail.com","username":"anperic"},"change_message_id":"73c99923f4e51a11cf05cbf941dc406badf85d37","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    - ansible_os_family \u003d\u003d \"Debian\""},{"line_number":175,"context_line":"    - enable_chrony | bool"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"- name: Get status of chronyd apparmor profile"},{"line_number":178,"context_line":"  command: apparmor_status --json"},{"line_number":179,"context_line":"  become: True"},{"line_number":180,"context_line":"  register: apparmor_status"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"b38d84bd_72ab6976","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":46},"in_reply_to":"513e14b9_7b6faf2b","updated":"2021-02-24 09:26:54.000000000","message":"Done","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"},{"author":{"_account_id":33105,"name":"Ana Peric","email":"anaperic@gmail.com","username":"anperic"},"change_message_id":"6ec42a18a1ff5705d2416d65dc512ad0a673853f","unresolved":true,"context_lines":[{"line_number":174,"context_line":"    - ansible_os_family \u003d\u003d \"Debian\""},{"line_number":175,"context_line":"    - enable_chrony | bool"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"- name: Get status of chronyd apparmor profile"},{"line_number":178,"context_line":"  command: apparmor_status --json"},{"line_number":179,"context_line":"  become: True"},{"line_number":180,"context_line":"  register: apparmor_status"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"4dcbf73d_e4111e8e","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":46},"in_reply_to":"84422ac6_dbc95517","updated":"2021-02-18 12:31:19.000000000","message":"Absolutely. For that I _may_ change the commit message slightly.\nWhat is good, is that libvirt does not come out of the box for debian, and chrony does since Buster. So just not sure if we want to do this here, or in a new change request?","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"6a2c184f8aa91b27b14f332442b47a49daf24627","unresolved":true,"context_lines":[{"line_number":178,"context_line":"  command: apparmor_status --json"},{"line_number":179,"context_line":"  become: True"},{"line_number":180,"context_line":"  register: apparmor_status"},{"line_number":181,"context_line":"  ignore_errors: True"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"- name: Remove apparmor profile for chrony"},{"line_number":184,"context_line":"  command: apparmor_parser -R /etc/apparmor.d/usr.sbin.chronyd"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ab4de433_f0c66dbd","line":181,"updated":"2021-02-18 09:28:46.000000000","message":"when: \u003e-\n  (ansible_os_family \u003d\u003d \"Debian\" and enable_chrony | bool) or\n  ansible_distribution \u003d\u003d \"Ubuntu\"","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"399c81d10aaa6e53a5c0c8f157e296104701a5d3","unresolved":true,"context_lines":[{"line_number":178,"context_line":"  command: apparmor_status --json"},{"line_number":179,"context_line":"  become: True"},{"line_number":180,"context_line":"  register: apparmor_status"},{"line_number":181,"context_line":"  ignore_errors: True"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"- name: Remove apparmor profile for chrony"},{"line_number":184,"context_line":"  command: apparmor_parser -R /etc/apparmor.d/usr.sbin.chronyd"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"176f652b_c2b7a465","line":181,"in_reply_to":"09f5cdb9_7bc8dcde","updated":"2021-02-22 10:31:23.000000000","message":"The Debian OS family includes Ubuntu and Debian. If you want to target a specific distro then it\u0027s ansible_distribution (which is used for the libvirt check).","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"},{"author":{"_account_id":33105,"name":"Ana Peric","email":"anaperic@gmail.com","username":"anperic"},"change_message_id":"73c99923f4e51a11cf05cbf941dc406badf85d37","unresolved":false,"context_lines":[{"line_number":178,"context_line":"  command: apparmor_status --json"},{"line_number":179,"context_line":"  become: True"},{"line_number":180,"context_line":"  register: apparmor_status"},{"line_number":181,"context_line":"  ignore_errors: True"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"- name: Remove apparmor profile for chrony"},{"line_number":184,"context_line":"  command: apparmor_parser -R /etc/apparmor.d/usr.sbin.chronyd"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"a861f072_9a263ff5","line":181,"in_reply_to":"176f652b_c2b7a465","updated":"2021-02-24 09:26:54.000000000","message":"Done","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"},{"author":{"_account_id":33105,"name":"Ana Peric","email":"anaperic@gmail.com","username":"anperic"},"change_message_id":"6ec42a18a1ff5705d2416d65dc512ad0a673853f","unresolved":true,"context_lines":[{"line_number":178,"context_line":"  command: apparmor_status --json"},{"line_number":179,"context_line":"  become: True"},{"line_number":180,"context_line":"  register: apparmor_status"},{"line_number":181,"context_line":"  ignore_errors: True"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"- name: Remove apparmor profile for chrony"},{"line_number":184,"context_line":"  command: apparmor_parser -R /etc/apparmor.d/usr.sbin.chronyd"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"09f5cdb9_7bc8dcde","line":181,"in_reply_to":"ab4de433_f0c66dbd","updated":"2021-02-18 12:31:19.000000000","message":"We could indeed pick up Ubuntu, but to be honest I didn\u0027t test it on Ubuntu, this is why I did not make the change for it. I presume this may be similar as in Debian, but I am not 100% sure.\nWe can definitely this change but I then also wonder why not to check if chrony is enabled for Ubuntu? I would assume enable_chrony needs to be true and then ansible_os_family \u003d\u003d \"Debian\" or ansible_os_family \u003d\u003d \"Ubuntu\".\n\nMaybe rather this?\n\nwhere:\n - (ansible_os_family \u003d\u003d \"Debian\" or ansible_os_family \u003d\u003d \"Ubuntu\") | bool) and enable_chrony\n - the rest...\nOr more readable:\n- (ansible_os_family \u003d\u003d \"Debian\" or ansible_os_family \u003d\u003d \"Ubuntu\") | bool)\n- enable_chrony\n...","commit_id":"45425046ff75c82384880929cae1ad18faf5b57e"}]}
