)]}'
{"tasks/keystone_db_setup.yml":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"1d0615100f4e035f537da629ef8c5537e4b92207","unresolved":false,"context_lines":[{"line_number":32,"context_line":"  register: keystone_db_sync_check"},{"line_number":33,"context_line":"  failed_when: keystone_db_sync_check.rc \u003d\u003d 1"},{"line_number":34,"context_line":"  changed_when: \"{{ keystone_db_sync_check.rc in [2, 3, 4] }}\""},{"line_number":35,"context_line":"  notify:"},{"line_number":36,"context_line":"    - Perform a Keystone DB sync contract"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"- name: Perform a Keystone DB sync expand"},{"line_number":39,"context_line":"  command: \"{{ keystone_bin }}/keystone-manage db_sync --expand\""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"da36d5c6_7f1ece0c","line":36,"range":{"start_line":35,"start_character":0,"end_line":36,"end_character":41},"updated":"2017-02-26 13:08:55.000000000","message":"This would notify it every time, which is reasonably harmless but I think it\u0027d be better if we only notify when the rc is 4 - perhaps it\u0027d be better to add a task later that does the contract if the rc is 4?\n\nDoing this would keep this task as a completely read only operation.\n\nI\u0027m not bent on the idea - just fielding a thought.","commit_id":"da86f64ae3626e0fb7347e7252c03e837993631e"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"82fdf52c1400ab9a5fb6f89d49493dc5b29e7780","unresolved":false,"context_lines":[{"line_number":32,"context_line":"  register: keystone_db_sync_check"},{"line_number":33,"context_line":"  failed_when: keystone_db_sync_check.rc \u003d\u003d 1"},{"line_number":34,"context_line":"  changed_when: \"{{ keystone_db_sync_check.rc in [2, 3, 4] }}\""},{"line_number":35,"context_line":"  notify:"},{"line_number":36,"context_line":"    - Perform a Keystone DB sync contract"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"- name: Perform a Keystone DB sync expand"},{"line_number":39,"context_line":"  command: \"{{ keystone_bin }}/keystone-manage db_sync --expand\""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"da36d5c6_31a9c2e0","line":36,"range":{"start_line":35,"start_character":0,"end_line":36,"end_character":41},"in_reply_to":"da36d5c6_41daedea","updated":"2017-02-27 22:14:36.000000000","message":"Yes, I think this task should only have an OK/failed response and the notify should be removed. The notify should be handled by subsequent tasks which key off the rc of this one.","commit_id":"da86f64ae3626e0fb7347e7252c03e837993631e"},{"author":{"_account_id":14805,"name":"Jimmy McCrory","email":"jimmy.mccrory@gmail.com","username":"jimmy-mccrory"},"change_message_id":"039d850226a90bfcbc57ca4734a288b29aef25ce","unresolved":false,"context_lines":[{"line_number":32,"context_line":"  register: keystone_db_sync_check"},{"line_number":33,"context_line":"  failed_when: keystone_db_sync_check.rc \u003d\u003d 1"},{"line_number":34,"context_line":"  changed_when: \"{{ keystone_db_sync_check.rc in [2, 3, 4] }}\""},{"line_number":35,"context_line":"  notify:"},{"line_number":36,"context_line":"    - Perform a Keystone DB sync contract"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"- name: Perform a Keystone DB sync expand"},{"line_number":39,"context_line":"  command: \"{{ keystone_bin }}/keystone-manage db_sync --expand\""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"da36d5c6_41daedea","line":36,"range":{"start_line":35,"start_character":0,"end_line":36,"end_character":41},"in_reply_to":"da36d5c6_7f1ece0c","updated":"2017-02-27 18:13:38.000000000","message":"My thinking was mark this task \u0027OK\u0027 when no db_sync commands are required, and \u0027changed\u0027 to say some thing is required.\n\nI originally had it \u0027changed_when\u0027 only for rc 4 to kick off the notify, but that seemed inconsistent and if the rc is 2 or 3 that still ultimately requires a contract (4) anyway.\n\nAre you wanting this task to only ever return OK/failed and subsequent tasks skipped/changed depending on this one\u0027s return code?","commit_id":"da86f64ae3626e0fb7347e7252c03e837993631e"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"1d0615100f4e035f537da629ef8c5537e4b92207","unresolved":false,"context_lines":[{"line_number":45,"context_line":"  command: \"{{ keystone_bin }}/keystone-manage db_sync --migrate\""},{"line_number":46,"context_line":"  become: yes"},{"line_number":47,"context_line":"  become_user: \"{{ keystone_system_user_name }}\""},{"line_number":48,"context_line":"  when: \"{{ keystone_db_sync_check.rc in [2, 3] }}\""},{"line_number":49,"context_line":"  notify:"},{"line_number":50,"context_line":"    - Perform a Keystone DB sync contract"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"da36d5c6_9f02a2b2","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":51},"updated":"2017-02-26 13:08:55.000000000","message":"Perhaps a better conditional would be:\n\nwhen:\n  - (keystone_db_sync_check.rc \u003d\u003d 3) or\n    (the expand just ran)","commit_id":"da86f64ae3626e0fb7347e7252c03e837993631e"},{"author":{"_account_id":14805,"name":"Jimmy McCrory","email":"jimmy.mccrory@gmail.com","username":"jimmy-mccrory"},"change_message_id":"039d850226a90bfcbc57ca4734a288b29aef25ce","unresolved":false,"context_lines":[{"line_number":45,"context_line":"  command: \"{{ keystone_bin }}/keystone-manage db_sync --migrate\""},{"line_number":46,"context_line":"  become: yes"},{"line_number":47,"context_line":"  become_user: \"{{ keystone_system_user_name }}\""},{"line_number":48,"context_line":"  when: \"{{ keystone_db_sync_check.rc in [2, 3] }}\""},{"line_number":49,"context_line":"  notify:"},{"line_number":50,"context_line":"    - Perform a Keystone DB sync contract"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"da36d5c6_21025970","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":51},"in_reply_to":"da36d5c6_9f02a2b2","updated":"2017-02-27 18:13:38.000000000","message":"Yeah, that would be more readable.","commit_id":"da86f64ae3626e0fb7347e7252c03e837993631e"},{"author":{"_account_id":14805,"name":"Jimmy McCrory","email":"jimmy.mccrory@gmail.com","username":"jimmy-mccrory"},"change_message_id":"039d850226a90bfcbc57ca4734a288b29aef25ce","unresolved":false,"context_lines":[{"line_number":47,"context_line":"  become_user: \"{{ keystone_system_user_name }}\""},{"line_number":48,"context_line":"  when: \"{{ keystone_db_sync_check.rc in [2, 3] }}\""},{"line_number":49,"context_line":"  notify:"},{"line_number":50,"context_line":"    - Perform a Keystone DB sync contract"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"da36d5c6_a147294a","line":50,"updated":"2017-02-27 18:13:38.000000000","message":"This isn\u0027t actually necessary as is. The first task\u0027s notify would be enough.","commit_id":"da86f64ae3626e0fb7347e7252c03e837993631e"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"82fdf52c1400ab9a5fb6f89d49493dc5b29e7780","unresolved":false,"context_lines":[{"line_number":47,"context_line":"  become_user: \"{{ keystone_system_user_name }}\""},{"line_number":48,"context_line":"  when: \"{{ keystone_db_sync_check.rc in [2, 3] }}\""},{"line_number":49,"context_line":"  notify:"},{"line_number":50,"context_line":"    - Perform a Keystone DB sync contract"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"da36d5c6_713dfaba","line":50,"in_reply_to":"da36d5c6_a147294a","updated":"2017-02-27 22:14:36.000000000","message":"Yes, but the first task should be read-only - only subsequent tasks which modify things should result in changes and thus this notification.","commit_id":"da86f64ae3626e0fb7347e7252c03e837993631e"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"445901cba0415bcae7f145c2425412292440553c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"- name: Check current state of Keystone DB"},{"line_number":31,"context_line":"  command: \"{{ keystone_bin }}/keystone-manage db_sync --check\""},{"line_number":32,"context_line":"  register: keystone_db_sync_check"},{"line_number":33,"context_line":"  failed_when: keystone_db_sync_check.rc \u003d\u003d 1"},{"line_number":34,"context_line":"  changed_when: \"{{ keystone_db_sync_check.rc not in [2, 3, 4] }}\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"- name: Perform a Keystone DB sync expand"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"da36d5c6_2b622117","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":45},"updated":"2017-02-28 08:11:10.000000000","message":"nit: I think that RC1 \u003d fatal by default so this isn\u0027t necessary.","commit_id":"d2e00019b49e6a07adb89b84536921a06c19ff0e"},{"author":{"_account_id":14805,"name":"Jimmy McCrory","email":"jimmy.mccrory@gmail.com","username":"jimmy-mccrory"},"change_message_id":"e0e842ac1530cb86d739e3f0b5a2de689d132446","unresolved":false,"context_lines":[{"line_number":43,"context_line":"  command: \"{{ keystone_bin }}/keystone-manage db_sync --migrate\""},{"line_number":44,"context_line":"  become: yes"},{"line_number":45,"context_line":"  become_user: \"{{ keystone_system_user_name }}\""},{"line_number":46,"context_line":"  when: \"{{ keystone_db_sync_check.rc in [2, 3] }}\""},{"line_number":47,"context_line":"  notify:"},{"line_number":48,"context_line":"    - Perform a Keystone DB sync contract"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":5,"id":"da36d5c6_835dbf4a","line":46,"updated":"2017-02-28 00:48:08.000000000","message":"This avoids a linting error:\nANSIBLE0016 Tasks that run when changed should likely be handlers","commit_id":"d2e00019b49e6a07adb89b84536921a06c19ff0e"}]}
