)]}'
{"tripleo-yum-config/example_playbook.yaml":[{"author":{"_account_id":12393,"name":"chandan kumar","display_name":"Chandan Kumar","email":"chkumar@redhat.com","username":"chkumar246"},"change_message_id":"c15f8e4d0d1cee7fe10dd6825826a01d708a0d28","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"- name: Example usage for tripleo_yum_config python module"},{"line_number":3,"context_line":"  hosts: localhost"},{"line_number":4,"context_line":"  tasks:"},{"line_number":5,"context_line":"    - name: Enable fake yum repo and set exclude dirs"},{"line_number":6,"context_line":"      become: true"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"805de555_adb4cf4e","line":3,"updated":"2021-07-06 14:48:10.000000000","message":"Since all these operations needs sudo privileges? Do we need to use become:true at play level?","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"d236661c3bd40cc713aaf68970f7597a83b4feaa","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"- name: Example usage for tripleo_yum_config python module"},{"line_number":3,"context_line":"  hosts: localhost"},{"line_number":4,"context_line":"  tasks:"},{"line_number":5,"context_line":"    - name: Enable fake yum repo and set exclude dirs"},{"line_number":6,"context_line":"      become: true"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"4949c090_bf5a3f5e","line":3,"in_reply_to":"805de555_adb4cf4e","updated":"2021-07-08 07:11:43.000000000","message":"Your comment makes sense, but this file is just meant as an example for usage I believe, so perhaps better to explicitly show that sudo is required","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"}],"tripleo-yum-config/tripleo_yum_config.py":[{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"short_description: Update yum configuration files for TripleO deployments."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"version_added: \"2.9\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"description:"},{"line_number":30,"context_line":"    - Update specific options for different yum configuration files like"}],"source_content_type":"text/x-python","patch_set":3,"id":"b648ce67_36084653","line":27,"range":{"start_line":27,"start_character":15,"end_line":27,"end_character":20},"updated":"2021-07-08 12:52:40.000000000","message":"please remove this, it\u0027s not added to 2.9","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":41,"context_line":"        description:"},{"line_number":42,"context_line":"          - Name of the repo or module to be changed. This options is"},{"line_number":43,"context_line":"            mandatory only for repo and module types."},{"line_number":44,"context_line":"        required: false"},{"line_number":45,"context_line":"        type: str"},{"line_number":46,"context_line":"    enabled:"},{"line_number":47,"context_line":"        description:"}],"source_content_type":"text/x-python","patch_set":3,"id":"82e6053f_88eab853","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":23},"updated":"2021-07-08 12:52:40.000000000","message":"if it\u0027s not required, no need to repeat it in every option, it\u0027s \"false\" by default","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":41,"context_line":"        description:"},{"line_number":42,"context_line":"          - Name of the repo or module to be changed. This options is"},{"line_number":43,"context_line":"            mandatory only for repo and module types."},{"line_number":44,"context_line":"        required: false"},{"line_number":45,"context_line":"        type: str"},{"line_number":46,"context_line":"    enabled:"},{"line_number":47,"context_line":"        description:"}],"source_content_type":"text/x-python","patch_set":3,"id":"19a32868_1b0c6956","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":23},"in_reply_to":"82e6053f_88eab853","updated":"2021-07-08 21:40:34.000000000","message":"ack","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":67,"context_line":"            a module that doesn\u0027t have a default profile."},{"line_number":68,"context_line":"        required: false"},{"line_number":69,"context_line":"        type: str"},{"line_number":70,"context_line":"    set_options:"},{"line_number":71,"context_line":"        description:"},{"line_number":72,"context_line":"          - Dictionary with options to be updated. All dictionary values must"},{"line_number":73,"context_line":"            be string or list of strings."}],"source_content_type":"text/x-python","patch_set":3,"id":"51332d9a_4ec4e69a","line":70,"range":{"start_line":70,"start_character":4,"end_line":70,"end_character":16},"updated":"2021-07-08 12:52:40.000000000","message":"would be nice to describe here suboptions, see example here: https://opendev.org/openstack/ansible-collections-openstack/src/commit/f376d4679e7bd0cef3d0092f9e4fb10aa5833081/plugins/modules/port.py#L24-L37","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":67,"context_line":"            a module that doesn\u0027t have a default profile."},{"line_number":68,"context_line":"        required: false"},{"line_number":69,"context_line":"        type: str"},{"line_number":70,"context_line":"    set_options:"},{"line_number":71,"context_line":"        description:"},{"line_number":72,"context_line":"          - Dictionary with options to be updated. All dictionary values must"},{"line_number":73,"context_line":"            be string or list of strings."}],"source_content_type":"text/x-python","patch_set":3,"id":"cfd6d1f2_8a2ae6ae","line":70,"range":{"start_line":70,"start_character":4,"end_line":70,"end_character":16},"in_reply_to":"51332d9a_4ec4e69a","updated":"2021-07-08 21:40:34.000000000","message":"My idea on this set_options is to be generic as a dict and accepts anything, since yum/dnf conf has too many options to be configured[1], wdyt?\n\n[1] https://dnf.readthedocs.io/en/latest/conf_ref.html","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":77,"context_line":"        description:"},{"line_number":78,"context_line":"          - Absolute path of the configuration file to be changed."},{"line_number":79,"context_line":"        required: false"},{"line_number":80,"context_line":"        type: str"},{"line_number":81,"context_line":"    dir_path:"},{"line_number":82,"context_line":"        description:"},{"line_number":83,"context_line":"          - Absolute path of the directory that contains the configuration"}],"source_content_type":"text/x-python","patch_set":3,"id":"9de7a396_ef33ec7e","line":80,"range":{"start_line":80,"start_character":8,"end_line":80,"end_character":17},"updated":"2021-07-08 12:52:40.000000000","message":"it can be \"type: path\"","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":77,"context_line":"        description:"},{"line_number":78,"context_line":"          - Absolute path of the configuration file to be changed."},{"line_number":79,"context_line":"        required: false"},{"line_number":80,"context_line":"        type: str"},{"line_number":81,"context_line":"    dir_path:"},{"line_number":82,"context_line":"        description:"},{"line_number":83,"context_line":"          - Absolute path of the directory that contains the configuration"}],"source_content_type":"text/x-python","patch_set":3,"id":"5d61ff87_fe6464a0","line":80,"range":{"start_line":80,"start_character":8,"end_line":80,"end_character":17},"in_reply_to":"9de7a396_ef33ec7e","updated":"2021-07-08 21:40:34.000000000","message":"nice","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":83,"context_line":"          - Absolute path of the directory that contains the configuration"},{"line_number":84,"context_line":"            file to be changed."},{"line_number":85,"context_line":"        required: false"},{"line_number":86,"context_line":"        type: str"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"author:"},{"line_number":89,"context_line":"    - Douglas Viroel (@viroel)"}],"source_content_type":"text/x-python","patch_set":3,"id":"8c7dcf4d_5c7b64bd","line":86,"range":{"start_line":86,"start_character":8,"end_line":86,"end_character":17},"updated":"2021-07-08 12:52:40.000000000","message":"ditto about \"type: path\"","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":83,"context_line":"          - Absolute path of the directory that contains the configuration"},{"line_number":84,"context_line":"            file to be changed."},{"line_number":85,"context_line":"        required: false"},{"line_number":86,"context_line":"        type: str"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"author:"},{"line_number":89,"context_line":"    - Douglas Viroel (@viroel)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a9f8147_a84ada29","line":86,"range":{"start_line":86,"start_character":8,"end_line":86,"end_character":17},"in_reply_to":"8c7dcf4d_5c7b64bd","updated":"2021-07-08 21:40:34.000000000","message":"nice","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":89,"context_line":"    - Douglas Viroel (@viroel)"},{"line_number":90,"context_line":"\u0027\u0027\u0027"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"EXAMPLES \u003d r\u0027\u0027\u0027"},{"line_number":93,"context_line":"# Set yum \u0027appstream\u0027 repo to enabled and exclude a list of packages"},{"line_number":94,"context_line":"- name: Enable appstream repo and exclude nodejs and mariadb packages"},{"line_number":95,"context_line":"  become: true"}],"source_content_type":"text/x-python","patch_set":3,"id":"22ec1c9c_fc0c580e","line":92,"range":{"start_line":92,"start_character":0,"end_line":92,"end_character":3},"updated":"2021-07-08 12:52:40.000000000","message":"please add also \"RETURN\" part, see example: https://opendev.org/openstack/ansible-collections-openstack/src/commit/f376d4679e7bd0cef3d0092f9e4fb10aa5833081/plugins/modules/port.py#L222\n\nfor example here it can be:\n\nRETURN \u003d \u0027\u0027\u0027\n\nmsg:\n    description: Description....\n    returned: On success.\n    type: str\n\u0027\u0027\u0027","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    - Douglas Viroel (@viroel)"},{"line_number":90,"context_line":"\u0027\u0027\u0027"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"EXAMPLES \u003d r\u0027\u0027\u0027"},{"line_number":93,"context_line":"# Set yum \u0027appstream\u0027 repo to enabled and exclude a list of packages"},{"line_number":94,"context_line":"- name: Enable appstream repo and exclude nodejs and mariadb packages"},{"line_number":95,"context_line":"  become: true"}],"source_content_type":"text/x-python","patch_set":3,"id":"69bf3a33_2efadad3","line":92,"range":{"start_line":92,"start_character":0,"end_line":92,"end_character":3},"in_reply_to":"22ec1c9c_fc0c580e","updated":"2021-07-08 21:40:34.000000000","message":"Ack","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":141,"context_line":"    supported_module_operations \u003d [\u0027install\u0027, \u0027remove\u0027, \u0027reset\u0027]"},{"line_number":142,"context_line":"    module_args \u003d dict("},{"line_number":143,"context_line":"        type\u003ddict(type\u003d\u0027str\u0027, required\u003dTrue, choices\u003dsupported_config_types),"},{"line_number":144,"context_line":"        name\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse),"},{"line_number":145,"context_line":"        enabled\u003ddict(type\u003d\u0027bool\u0027, required\u003dFalse),"},{"line_number":146,"context_line":"        operation\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse,"},{"line_number":147,"context_line":"                       choices\u003dsupported_module_operations),"}],"source_content_type":"text/x-python","patch_set":3,"id":"d166ebdd_6b9d38b1","line":144,"range":{"start_line":144,"start_character":31,"end_line":144,"end_character":44},"updated":"2021-07-08 12:52:40.000000000","message":"all these required\u003dFalse are not needed","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":141,"context_line":"    supported_module_operations \u003d [\u0027install\u0027, \u0027remove\u0027, \u0027reset\u0027]"},{"line_number":142,"context_line":"    module_args \u003d dict("},{"line_number":143,"context_line":"        type\u003ddict(type\u003d\u0027str\u0027, required\u003dTrue, choices\u003dsupported_config_types),"},{"line_number":144,"context_line":"        name\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse),"},{"line_number":145,"context_line":"        enabled\u003ddict(type\u003d\u0027bool\u0027, required\u003dFalse),"},{"line_number":146,"context_line":"        operation\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse,"},{"line_number":147,"context_line":"                       choices\u003dsupported_module_operations),"}],"source_content_type":"text/x-python","patch_set":3,"id":"aa6f1e01_e59d7c88","line":144,"range":{"start_line":144,"start_character":31,"end_line":144,"end_character":44},"in_reply_to":"d166ebdd_6b9d38b1","updated":"2021-07-08 21:40:34.000000000","message":"yeah, i can remove them all, since it is clear enough for everyone that reads the code","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":145,"context_line":"        enabled\u003ddict(type\u003d\u0027bool\u0027, required\u003dFalse),"},{"line_number":146,"context_line":"        operation\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse,"},{"line_number":147,"context_line":"                       choices\u003dsupported_module_operations),"},{"line_number":148,"context_line":"        stream\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse),"},{"line_number":149,"context_line":"        profile\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse),"},{"line_number":150,"context_line":"        set_options\u003ddict(type\u003d\u0027dict\u0027, required\u003dFalse),"},{"line_number":151,"context_line":"        file_path\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":3,"id":"18f7ec51_b78a54f9","line":148,"range":{"start_line":148,"start_character":8,"end_line":148,"end_character":47},"updated":"2021-07-08 12:52:40.000000000","message":"seems for me as a \"boolean\" - stream or not stream","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":145,"context_line":"        enabled\u003ddict(type\u003d\u0027bool\u0027, required\u003dFalse),"},{"line_number":146,"context_line":"        operation\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse,"},{"line_number":147,"context_line":"                       choices\u003dsupported_module_operations),"},{"line_number":148,"context_line":"        stream\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse),"},{"line_number":149,"context_line":"        profile\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse),"},{"line_number":150,"context_line":"        set_options\u003ddict(type\u003d\u0027dict\u0027, required\u003dFalse),"},{"line_number":151,"context_line":"        file_path\u003ddict(type\u003d\u0027str\u0027, required\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":3,"id":"48453e23_fc0a0f8f","line":148,"range":{"start_line":148,"start_character":8,"end_line":148,"end_character":47},"in_reply_to":"18f7ec51_b78a54f9","updated":"2021-07-08 21:40:34.000000000","message":"it is actually the module\u0027s stream name[1], so it must be a string, e.g.: stream\u003d\"3.0\" or stream\u003d\"master\"\n\n[1] https://dnf.readthedocs.io/en/latest/modularity.html#definitions","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":162,"context_line":"        supports_check_mode\u003dTrue"},{"line_number":163,"context_line":"    )"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    m_type \u003d module.params.get(\u0027type\u0027)"},{"line_number":166,"context_line":"    m_name \u003d module.params.get(\u0027name\u0027)"},{"line_number":167,"context_line":"    m_set_opts \u003d module.params.get(\u0027set_options\u0027, {})"},{"line_number":168,"context_line":"    m_enabled \u003d module.params.get(\u0027enabled\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3d1c48fa_ae2a7be9","line":165,"range":{"start_line":165,"start_character":14,"end_line":165,"end_character":38},"updated":"2021-07-08 12:52:40.000000000","message":"no need to use \".get\" method, all parameters are set to None by default, so all keys exist","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":162,"context_line":"        supports_check_mode\u003dTrue"},{"line_number":163,"context_line":"    )"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    m_type \u003d module.params.get(\u0027type\u0027)"},{"line_number":166,"context_line":"    m_name \u003d module.params.get(\u0027name\u0027)"},{"line_number":167,"context_line":"    m_set_opts \u003d module.params.get(\u0027set_options\u0027, {})"},{"line_number":168,"context_line":"    m_enabled \u003d module.params.get(\u0027enabled\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"6aa9a161_f0e427f0","line":165,"range":{"start_line":165,"start_character":14,"end_line":165,"end_character":38},"in_reply_to":"3d1c48fa_ae2a7be9","updated":"2021-07-08 21:40:34.000000000","message":":) thanks","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    m_type \u003d module.params.get(\u0027type\u0027)"},{"line_number":166,"context_line":"    m_name \u003d module.params.get(\u0027name\u0027)"},{"line_number":167,"context_line":"    m_set_opts \u003d module.params.get(\u0027set_options\u0027, {})"},{"line_number":168,"context_line":"    m_enabled \u003d module.params.get(\u0027enabled\u0027)"},{"line_number":169,"context_line":"    m_file_path \u003d module.params.get(\u0027file_path\u0027)"},{"line_number":170,"context_line":"    m_dir_path \u003d module.params.get(\u0027dir_path\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"d612e5e1_9dc6e968","line":167,"range":{"start_line":167,"start_character":34,"end_line":167,"end_character":52},"updated":"2021-07-08 12:52:40.000000000","message":"this can be set in module_args:\n\nset_options\u003ddict(type\u003d\u0027dict\u0027, default\u003d{}),","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    m_type \u003d module.params.get(\u0027type\u0027)"},{"line_number":166,"context_line":"    m_name \u003d module.params.get(\u0027name\u0027)"},{"line_number":167,"context_line":"    m_set_opts \u003d module.params.get(\u0027set_options\u0027, {})"},{"line_number":168,"context_line":"    m_enabled \u003d module.params.get(\u0027enabled\u0027)"},{"line_number":169,"context_line":"    m_file_path \u003d module.params.get(\u0027file_path\u0027)"},{"line_number":170,"context_line":"    m_dir_path \u003d module.params.get(\u0027dir_path\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bbd762bf_d2d37ff3","line":167,"range":{"start_line":167,"start_character":34,"end_line":167,"end_character":52},"in_reply_to":"d612e5e1_9dc6e968","updated":"2021-07-08 21:40:34.000000000","message":"+1","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":169,"context_line":"    m_file_path \u003d module.params.get(\u0027file_path\u0027)"},{"line_number":170,"context_line":"    m_dir_path \u003d module.params.get(\u0027dir_path\u0027)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    # Sanity checks"},{"line_number":173,"context_line":"    if m_type in [\u0027repo\u0027, \u0027module\u0027] and m_name is None:"},{"line_number":174,"context_line":"        result[\u0027msg\u0027] \u003d ("},{"line_number":175,"context_line":"            \"The parameter \u0027name\u0027 is mandatory when \u0027type\u0027 is set to \u0027repo\u0027 \""},{"line_number":176,"context_line":"            \"or \u0027module\u0027.\")"},{"line_number":177,"context_line":"        module.fail_json(**result)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    # \u0027set_options\u0027 expects a dict that can hold, as value, strings and list"},{"line_number":180,"context_line":"    # of strings. List of strings will be converted to a comma-separated list."}],"source_content_type":"text/x-python","patch_set":3,"id":"f21e26d5_e94d1ec1","line":177,"range":{"start_line":172,"start_character":0,"end_line":177,"end_character":34},"updated":"2021-07-08 12:52:40.000000000","message":"this also can be processed by arguments, but it\u0027s really optional, just fyi: https://opendev.org/openstack/ansible-collections-openstack/src/commit/f376d4679e7bd0cef3d0092f9e4fb10aa5833081/contrib/module_template.py.j2#L59-L76","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":169,"context_line":"    m_file_path \u003d module.params.get(\u0027file_path\u0027)"},{"line_number":170,"context_line":"    m_dir_path \u003d module.params.get(\u0027dir_path\u0027)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    # Sanity checks"},{"line_number":173,"context_line":"    if m_type in [\u0027repo\u0027, \u0027module\u0027] and m_name is None:"},{"line_number":174,"context_line":"        result[\u0027msg\u0027] \u003d ("},{"line_number":175,"context_line":"            \"The parameter \u0027name\u0027 is mandatory when \u0027type\u0027 is set to \u0027repo\u0027 \""},{"line_number":176,"context_line":"            \"or \u0027module\u0027.\")"},{"line_number":177,"context_line":"        module.fail_json(**result)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    # \u0027set_options\u0027 expects a dict that can hold, as value, strings and list"},{"line_number":180,"context_line":"    # of strings. List of strings will be converted to a comma-separated list."}],"source_content_type":"text/x-python","patch_set":3,"id":"0cedaaaf_40b5adc8","line":177,"range":{"start_line":172,"start_character":0,"end_line":177,"end_character":34},"in_reply_to":"f21e26d5_e94d1ec1","updated":"2021-07-08 21:40:34.000000000","message":"oh, this makes things easier. thanks for showing me that.","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":176,"context_line":"            \"or \u0027module\u0027.\")"},{"line_number":177,"context_line":"        module.fail_json(**result)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    # \u0027set_options\u0027 expects a dict that can hold, as value, strings and list"},{"line_number":180,"context_line":"    # of strings. List of strings will be converted to a comma-separated list."},{"line_number":181,"context_line":"    invalid_set_opts_msg \u003d ("},{"line_number":182,"context_line":"        \"The provided value for \u0027set_options\u0027 parameter has an invalid \""}],"source_content_type":"text/x-python","patch_set":3,"id":"5276a428_aa56824e","line":179,"range":{"start_line":179,"start_character":40,"end_line":179,"end_character":76},"updated":"2021-07-08 12:52:40.000000000","message":"and if it\u0027s a number, like \"priority\" option? Why not to force \"stringify\" on all of them?","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":176,"context_line":"            \"or \u0027module\u0027.\")"},{"line_number":177,"context_line":"        module.fail_json(**result)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"    # \u0027set_options\u0027 expects a dict that can hold, as value, strings and list"},{"line_number":180,"context_line":"    # of strings. List of strings will be converted to a comma-separated list."},{"line_number":181,"context_line":"    invalid_set_opts_msg \u003d ("},{"line_number":182,"context_line":"        \"The provided value for \u0027set_options\u0027 parameter has an invalid \""}],"source_content_type":"text/x-python","patch_set":3,"id":"23b870fa_a6bab0f9","line":179,"range":{"start_line":179,"start_character":40,"end_line":179,"end_character":76},"in_reply_to":"5276a428_aa56824e","updated":"2021-07-08 21:40:34.000000000","message":"yes, we can do that too, won\u0027t be a problem.","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":192,"context_line":"                result[\u0027msg\u0027] \u003d invalid_set_opts_msg"},{"line_number":193,"context_line":"                module.fail_json(**result)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    if module.check_mode:"},{"line_number":196,"context_line":"        # Checks were already made above"},{"line_number":197,"context_line":"        module.exit_json(**result)"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9663dd48_3cc7b716","line":195,"range":{"start_line":195,"start_character":0,"end_line":195,"end_character":25},"updated":"2021-07-08 12:52:40.000000000","message":"Well, it\u0027s not really what meant by check_mode in Ansible. It should emulate full module execution, but not execute, although I think it can be improved in future, not critical.","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":192,"context_line":"                result[\u0027msg\u0027] \u003d invalid_set_opts_msg"},{"line_number":193,"context_line":"                module.fail_json(**result)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    if module.check_mode:"},{"line_number":196,"context_line":"        # Checks were already made above"},{"line_number":197,"context_line":"        module.exit_json(**result)"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"f2ff7e8e_977f3a80","line":195,"range":{"start_line":195,"start_character":0,"end_line":195,"end_character":25},"in_reply_to":"9663dd48_3cc7b716","updated":"2021-07-08 21:40:34.000000000","message":"That\u0027s true, it should at least provide the expected change in the config files. Need to measure the effort for that, or just remove it. Thanks","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"15886c3fab3dc658d0e8bff0a061c838ad1f70db","unresolved":true,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    except Exception as exc:"},{"line_number":229,"context_line":"        result[\u0027msg\u0027] \u003d str(exc)"},{"line_number":230,"context_line":"        module.fail_json(**result)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    # Successful module execution"},{"line_number":233,"context_line":"    result[\u0027changed\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":3,"id":"efe7d632_c931d4e6","line":230,"range":{"start_line":230,"start_character":15,"end_line":230,"end_character":24},"updated":"2021-07-08 12:52:40.000000000","message":"fail_json receives only one argument \"msg\":\n  \n  module.fail_json(msg\u003d\"Module failed because ...\")","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"09f646afea801e4bad317e37e5cb38cff3be42c6","unresolved":true,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    except Exception as exc:"},{"line_number":229,"context_line":"        result[\u0027msg\u0027] \u003d str(exc)"},{"line_number":230,"context_line":"        module.fail_json(**result)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    # Successful module execution"},{"line_number":233,"context_line":"    result[\u0027changed\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":3,"id":"fefe6dc6_aede0791","line":230,"range":{"start_line":230,"start_character":15,"end_line":230,"end_character":24},"in_reply_to":"efe7d632_c931d4e6","updated":"2021-07-08 21:40:34.000000000","message":"Acording with the docs it also accepts kwargs as parameter[1]. At the end it will print the entire dict. But i don\u0027t have anything else to print here from \u0027result\u0027, so I can change to be \u0027msg\u0027 only too.\n[1] https://docs.ansible.com/ansible/latest/reference_appendices/module_utils.html#ansiblemodule","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"},{"author":{"_account_id":10969,"name":"Shnaidman Sagi (Sergey)","display_name":"Shnaidman Sagi","email":"sshnaidm@redhat.com","username":"sergsh"},"change_message_id":"1fd3eed26f32ff086888a311099af51d41bdb3bd","unresolved":true,"context_lines":[{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    except Exception as exc:"},{"line_number":229,"context_line":"        result[\u0027msg\u0027] \u003d str(exc)"},{"line_number":230,"context_line":"        module.fail_json(**result)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    # Successful module execution"},{"line_number":233,"context_line":"    result[\u0027changed\u0027] \u003d True"}],"source_content_type":"text/x-python","patch_set":3,"id":"668b30a7_0145e3da","line":230,"range":{"start_line":230,"start_character":15,"end_line":230,"end_character":24},"in_reply_to":"fefe6dc6_aede0791","updated":"2021-07-12 13:03:15.000000000","message":"well, as you can see, the \"msg\" is mandatory, kwargs are optional","commit_id":"82dd143ce861a621eb3796fff1dc1a5a1d973356"}]}
