)]}'
{"ansible/host-command-run.yml":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"32a4ad83e22b3de69cc81db74585cc3017807f0e","unresolved":false,"context_lines":[{"line_number":5,"context_line":"  tasks:"},{"line_number":6,"context_line":"    - name: Run command"},{"line_number":7,"context_line":"      command: \"{{ host_command_to_run }}\""},{"line_number":8,"context_line":"      become: true"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3f79a3b5_b1286a86","line":8,"updated":"2018-08-08 07:45:19.000000000","message":"We could use the kayobe argument --become to make this optional.","commit_id":"8bd0f10c382e1746aefc9e873cfc62495e8758c1"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"583ea97890aadc7690a21a0df96e98a246de2ef4","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  hosts: seed:overcloud"},{"line_number":4,"context_line":"  tasks:"},{"line_number":5,"context_line":"    - name: Run a command"},{"line_number":6,"context_line":"      command: \"{{ host_command_to_run }}\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3f79a3b5_fd73ade4","line":6,"updated":"2018-12-20 10:51:27.000000000","message":"Thoughts on using the shell module? This would, for example, allow us to use redirects.\n\nCould also have an option to run as root?","commit_id":"8c2c28a5fe233d2be0e5ee26e543374a7a97c9e6"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"50eb733abe7395cf9e39f8d2f84140e845960eca","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  hosts: seed:overcloud"},{"line_number":4,"context_line":"  tasks:"},{"line_number":5,"context_line":"    - name: Run a command"},{"line_number":6,"context_line":"      command: \"{{ host_command_to_run }}\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"bfdaf3ff_a1a43aa7","line":6,"in_reply_to":"3f79a3b5_40051815","updated":"2019-01-18 11:18:00.000000000","message":"Switched to shell.","commit_id":"8c2c28a5fe233d2be0e5ee26e543374a7a97c9e6"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"b5ceec3bbe2ca336f1c834122923fe9b5a0c9b86","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  hosts: seed:overcloud"},{"line_number":4,"context_line":"  tasks:"},{"line_number":5,"context_line":"    - name: Run a command"},{"line_number":6,"context_line":"      command: \"{{ host_command_to_run }}\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3f79a3b5_40051815","line":6,"in_reply_to":"3f79a3b5_e0c30404","updated":"2018-12-20 11:18:56.000000000","message":"RE: output you can always increase the verbosity to see the output, but you are right, it might be nice to show it as a default.","commit_id":"8c2c28a5fe233d2be0e5ee26e543374a7a97c9e6"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"580225b73308fb38862a51729c39412852dcd425","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  hosts: seed:overcloud"},{"line_number":4,"context_line":"  tasks:"},{"line_number":5,"context_line":"    - name: Run a command"},{"line_number":6,"context_line":"      command: \"{{ host_command_to_run }}\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3f79a3b5_e0c30404","line":6,"in_reply_to":"3f79a3b5_fd73ade4","updated":"2018-12-20 11:06:05.000000000","message":"Shell could be useful. You can run as root via --become. Might be nice to document that.\n\nI wondered if (optionally?) being able to see the output could be useful too.","commit_id":"8c2c28a5fe233d2be0e5ee26e543374a7a97c9e6"}],"doc/source/administration.rst":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"6a8130049a4781f1388a662b9b73f205e750522f","unresolved":false,"context_lines":[{"line_number":27,"context_line":"Note that these commands do not affect packages installed in containers, only"},{"line_number":28,"context_line":"those installed on the host."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Run Command"},{"line_number":31,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"It is possible to run a command on the seed and overcloud hosts::"}],"source_content_type":"text/x-rst","patch_set":8,"id":"3f79a3b5_2fca569f","line":30,"updated":"2018-10-01 09:39:32.000000000","message":"nit: Run Commands","commit_id":"f1b9df5dcf224b6d93cdcd72e3f5c8e52d685e3c"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"6a8130049a4781f1388a662b9b73f205e750522f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"It is possible to run a command on the seed and overcloud hosts::"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    (kayobe) $ kayobe seed host command run --command \u003ccommand\u003e"},{"line_number":36,"context_line":"    (kayobe) $ kayobe overcloud host command run --command \u003ccommand\u003e"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"For example::"},{"line_number":39,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"3f79a3b5_6fd5ae1a","line":36,"updated":"2018-10-01 09:39:32.000000000","message":"This will need quotes","commit_id":"f1b9df5dcf224b6d93cdcd72e3f5c8e52d685e3c"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"6a8130049a4781f1388a662b9b73f205e750522f","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"For example::"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    (kayobe) $ kayobe overcloud host command run --command service docker restart"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"Reconfiguring Containerised Services"},{"line_number":43,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":8,"id":"3f79a3b5_0fd67a27","line":40,"updated":"2018-10-01 09:39:32.000000000","message":"As will this","commit_id":"f1b9df5dcf224b6d93cdcd72e3f5c8e52d685e3c"}],"kayobe/cli/commands.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"bfeec7ce673257840755cf01934c385774461967","unresolved":false,"context_lines":[{"line_number":422,"context_line":"        # Run final kayobe playbooks."},{"line_number":423,"context_line":"        playbooks \u003d _build_playbook_list("},{"line_number":424,"context_line":"            \"kolla-target-venv\", \"kolla-host\", \"docker\")"},{"line_number":425,"context_line":"        self.run_kayobe_playbooks(parsed_args, playbooks, limit\u003d\"seed\")"},{"line_number":426,"context_line":""},{"line_number":427,"context_line":"class SeedHostRunCommand(KayobeAnsibleMixin, VaultMixin, Command):"},{"line_number":428,"context_line":"    \"\"\"Run command on the seed host.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_26c20d35","line":425,"updated":"2018-08-06 12:52:14.000000000","message":"pep8 requires 2 lines between classes.","commit_id":"99fe7b5757a961097f9a54b2e18bc1381c36ae10"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"bfeec7ce673257840755cf01934c385774461967","unresolved":false,"context_lines":[{"line_number":424,"context_line":"            \"kolla-target-venv\", \"kolla-host\", \"docker\")"},{"line_number":425,"context_line":"        self.run_kayobe_playbooks(parsed_args, playbooks, limit\u003d\"seed\")"},{"line_number":426,"context_line":""},{"line_number":427,"context_line":"class SeedHostRunCommand(KayobeAnsibleMixin, VaultMixin, Command):"},{"line_number":428,"context_line":"    \"\"\"Run command on the seed host.\"\"\""},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    def get_parser(self, prog_name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_c6bb19e3","line":427,"updated":"2018-08-06 12:52:14.000000000","message":"nit: The commands are normally named with the verb at the end, so \u0027seed host command run\u0027","commit_id":"99fe7b5757a961097f9a54b2e18bc1381c36ae10"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"bfeec7ce673257840755cf01934c385774461967","unresolved":false,"context_lines":[{"line_number":431,"context_line":"        parser \u003d super(SeedHostRunCommand, self).get_parser(prog_name)"},{"line_number":432,"context_line":"        group \u003d parser.add_argument_group(\"Host Run Command\")"},{"line_number":433,"context_line":"        group.add_argument(\"--commands\","},{"line_number":434,"context_line":"                           help\u003d\"List of commands to run.\")"},{"line_number":435,"context_line":"        return parser"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    def take_action(self, parsed_args):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_46cb8952","line":434,"updated":"2018-08-06 12:52:14.000000000","message":"It doesn\u0027t really make sense to make the command optional. Could you give an example of how you would run multiple commands? I\u0027m not seeing how a list of commands would be generated here. I think there are two options.\n\nkayobe seed host command run --command \"command1 --arg arg1\" --command \"command2 --arg arg2\"\n\nOr only allow one command:\n\nkayobe seed host command run command -- command --arg1\n\nYou\u0027d probably need the -- to ensure that arguments to the command aren\u0027t processed by kayobe.","commit_id":"99fe7b5757a961097f9a54b2e18bc1381c36ae10"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"b5ba3428753f3ec1190d2c09b85c5ac331368499","unresolved":false,"context_lines":[{"line_number":431,"context_line":"    def get_parser(self, prog_name):"},{"line_number":432,"context_line":"        parser \u003d super(SeedHostRunCommand, self).get_parser(prog_name)"},{"line_number":433,"context_line":"        group \u003d parser.add_argument_group(\"Host Command Run\")"},{"line_number":434,"context_line":"        group.add_argument(\"--command\","},{"line_number":435,"context_line":"                           help\u003d\"Command to run.\")"},{"line_number":436,"context_line":"        return parser"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_1745b9b3","line":434,"updated":"2018-08-06 15:12:11.000000000","message":"Have you tried this with a command with arguments?","commit_id":"373a6b03d8a865528eab27cfc09b61c96d3a8e9c"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"8c826ed43211fb47657e0247e74cf79dddd3b863","unresolved":false,"context_lines":[{"line_number":431,"context_line":"    def get_parser(self, prog_name):"},{"line_number":432,"context_line":"        parser \u003d super(SeedHostRunCommand, self).get_parser(prog_name)"},{"line_number":433,"context_line":"        group \u003d parser.add_argument_group(\"Host Command Run\")"},{"line_number":434,"context_line":"        group.add_argument(\"--command\","},{"line_number":435,"context_line":"                           help\u003d\"Command to run.\")"},{"line_number":436,"context_line":"        return parser"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_5769f122","line":434,"in_reply_to":"3f79a3b5_1745b9b3","updated":"2018-08-06 15:20:37.000000000","message":"You probably need something like\n\ngroup.add_argument(\"command\", nargs\u003d\"+\",\n                   help\u003d\"Command to run.\")","commit_id":"373a6b03d8a865528eab27cfc09b61c96d3a8e9c"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"8c826ed43211fb47657e0247e74cf79dddd3b863","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        extra_vars \u003d {}"},{"line_number":441,"context_line":"        if parsed_args.commands:"},{"line_number":442,"context_line":"            extra_vars[\"host_command_to_run\"] \u003d ("},{"line_number":443,"context_line":"                parsed_args.commands)"},{"line_number":444,"context_line":"        playbooks \u003d _build_playbook_list(\"host-command-run\")"},{"line_number":445,"context_line":"        self.run_kayobe_playbooks(parsed_args, playbooks, limit\u003d\"seed\","},{"line_number":446,"context_line":"                                  extra_vars\u003dextra_vars)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_f7aa7d17","line":443,"updated":"2018-08-06 15:20:37.000000000","message":"Might need to consider escaping here - hopefully it won\u0027t be required but worth testing.","commit_id":"373a6b03d8a865528eab27cfc09b61c96d3a8e9c"}],"kayobe/tests/unit/cli/test_commands.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"086785b8a78c0728a2fe4e2ecef8b74b560cbd42","unresolved":false,"context_lines":[{"line_number":323,"context_line":"    def test_seed_host_command_run(self, mock_run):"},{"line_number":324,"context_line":"        command \u003d commands.SeedHostCommandRun(TestApp(), [])"},{"line_number":325,"context_line":"        parser \u003d command.get_parser(\"test\")"},{"line_number":326,"context_line":"        parsed_args \u003d parser.parse_args([\"--command\", \"ls\"])"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        result \u003d command.run(parsed_args)"},{"line_number":329,"context_line":"        self.assertEqual(0, result)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_3548e3b1","line":326,"updated":"2018-09-25 09:18:45.000000000","message":"I\u0027ve raised concerns about commands with arguments, particularly commands with arguments starting with dashes (-). I\u0027d like to see coverage of those cases here.","commit_id":"4beec2e69d9c47469e1f691ad1d5444d74069e50"},{"author":{"_account_id":18368,"name":"Kevin Tibi","email":"kevintibi@hotmail.com","username":"kodokuu"},"change_message_id":"bf35b80cd253379e518840c7b658e0dbb90612aa","unresolved":false,"context_lines":[{"line_number":323,"context_line":"    def test_seed_host_command_run(self, mock_run):"},{"line_number":324,"context_line":"        command \u003d commands.SeedHostCommandRun(TestApp(), [])"},{"line_number":325,"context_line":"        parser \u003d command.get_parser(\"test\")"},{"line_number":326,"context_line":"        parsed_args \u003d parser.parse_args([\"--command\", \"ls\"])"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        result \u003d command.run(parsed_args)"},{"line_number":329,"context_line":"        self.assertEqual(0, result)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_4e7950c3","line":326,"in_reply_to":"3f79a3b5_3548e3b1","updated":"2018-11-15 09:03:09.000000000","message":"Thx for review, so do you have example of what do you want ?","commit_id":"4beec2e69d9c47469e1f691ad1d5444d74069e50"}],"kayobe/utils.py":[{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"c367357b0f84d93df76264e28e17e7aea26119b7","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    :param string: the string to escape"},{"line_number":141,"context_line":"    :return: the escaped string"},{"line_number":142,"context_line":"    \"\"\""},{"line_number":143,"context_line":"    return \u0027\u0027.join((\u0027{% raw %}\u0027, string, \u0027{% endraw %}\u0027))"}],"source_content_type":"text/x-python","patch_set":13,"id":"9fdfeff1_d342093e","line":143,"range":{"start_line":143,"start_character":4,"end_line":143,"end_character":10},"updated":"2019-02-04 10:17:39.000000000","message":"You can still be irritating and do something like this: `kayobe overcloud host command run --command \u0027echo {% endraw %} {{ hostvars }} {% raw %}\u0027 -vvv`, and it will template hostvars, but probably not an issue in the real world.","commit_id":"caa77464f7e7a8952477ecf70a49a73dd11d743f"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"61c470258922b8619268dc78cb36d4fedfb137e5","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    :param string: the string to escape"},{"line_number":141,"context_line":"    :return: the escaped string"},{"line_number":142,"context_line":"    \"\"\""},{"line_number":143,"context_line":"    return \u0027\u0027.join((\u0027{% raw %}\u0027, string, \u0027{% endraw %}\u0027))"}],"source_content_type":"text/x-python","patch_set":13,"id":"9fdfeff1_13dbb14e","line":143,"range":{"start_line":143,"start_character":4,"end_line":143,"end_character":10},"in_reply_to":"9fdfeff1_d342093e","updated":"2019-02-04 10:33:27.000000000","message":"a jinja injection vulnerability - nice spot","commit_id":"caa77464f7e7a8952477ecf70a49a73dd11d743f"}],"setup.cfg":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"32a4ad83e22b3de69cc81db74585cc3017807f0e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    overcloud_deprovision \u003d kayobe.cli.commands:OvercloudDeprovision"},{"line_number":46,"context_line":"    overcloud_hardware_inspect \u003d kayobe.cli.commands:OvercloudHardwareInspect"},{"line_number":47,"context_line":"    overcloud_host_configure \u003d kayobe.cli.commands:OvercloudHostConfigure"},{"line_number":48,"context_line":"    overcloud_host_run_command \u003d kayobe.cli.commands:OvercloudHostRunCommand"},{"line_number":49,"context_line":"    overcloud_host_upgrade \u003d kayobe.cli.commands:OvercloudHostUpgrade"},{"line_number":50,"context_line":"    overcloud_introspection_data_save \u003d kayobe.cli.commands:OvercloudIntrospectionDataSave"},{"line_number":51,"context_line":"    overcloud_inventory_discover \u003d kayobe.cli.commands:OvercloudInventoryDiscover"}],"source_content_type":"text/x-ttcn-cfg","patch_set":3,"id":"3f79a3b5_7109722a","line":48,"updated":"2018-08-08 07:45:19.000000000","message":"Needs updating here too.","commit_id":"8bd0f10c382e1746aefc9e873cfc62495e8758c1"}]}
