)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"517c38fcea546f9123392bf7a0a49890cc3cd37a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b70be8d4_45e9cd5b","updated":"2025-05-19 16:58:21.000000000","message":"I\u0027m not sure about the approach of making this so dynamic, it should be discussed in the kolla community before proceeding.","commit_id":"e272706de80edc3296893b2f0e318c32ba8a2df9"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"c59e38da33953214a24727c248f1194dbd754ad1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"d04e236d_ea8eceac","updated":"2025-05-21 19:39:34.000000000","message":"Nice jinja2 hell, but that shows that might be we should be defining them as list of dicts in yaml and converting to json ;-)","commit_id":"395f8b7cfc980d44ce373934e9e8e05afaef35e0"}],"ansible/roles/common/templates/kolla-toolbox.json.j2":[{"author":{"_account_id":37306,"name":"Piotr Milewski","display_name":"Piotr Milewski","email":"vurmil@gmail.com","username":"vurmil"},"change_message_id":"d8950793384fa93194569fd76fee8adc456b38b3","unresolved":false,"context_lines":[{"line_number":29,"context_line":"{%- endif %}"},{"line_number":30,"context_line":"{"},{"line_number":31,"context_line":"  \"command\": \"kolla_toolbox\","},{"line_number":32,"context_line":"  \"config_files\": {{ config_files | to_nice_json(indent\u003d2) }},"},{"line_number":33,"context_line":"  \"permissions\": ["},{"line_number":34,"context_line":"    {"},{"line_number":35,"context_line":"      \"path\": \"/var/log/kolla/ansible.log\","}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"d2c3448d_58bbcf10","line":32,"range":{"start_line":32,"start_character":36,"end_line":32,"end_character":48},"updated":"2025-05-19 13:44:24.000000000","message":"my suggestion is to rework all config files like this\ndynamically build commas, instead of manually controlling commas, we can build a list of dictionaries based on conditions and then convert it to JSON.","commit_id":"e272706de80edc3296893b2f0e318c32ba8a2df9"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"517c38fcea546f9123392bf7a0a49890cc3cd37a","unresolved":true,"context_lines":[{"line_number":36,"context_line":"      \"perm\": \"0664\","},{"line_number":37,"context_line":"      \"owner\": \"ansible:kolla\""},{"line_number":38,"context_line":"    }"},{"line_number":39,"context_line":"  ]"},{"line_number":40,"context_line":"}"}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"e18d0eb9_2294034b","line":39,"updated":"2025-05-19 16:58:21.000000000","message":"please keep using 4 spaces per indentation","commit_id":"e272706de80edc3296893b2f0e318c32ba8a2df9"},{"author":{"_account_id":37306,"name":"Piotr Milewski","display_name":"Piotr Milewski","email":"vurmil@gmail.com","username":"vurmil"},"change_message_id":"09234758c1dc61b034118439aaa20e890f86b6f5","unresolved":false,"context_lines":[{"line_number":36,"context_line":"      \"perm\": \"0664\","},{"line_number":37,"context_line":"      \"owner\": \"ansible:kolla\""},{"line_number":38,"context_line":"    }"},{"line_number":39,"context_line":"  ]"},{"line_number":40,"context_line":"}"}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"f5041903_3b5d03f6","line":39,"in_reply_to":"e18d0eb9_2294034b","updated":"2025-05-19 17:19:51.000000000","message":"Acknowledged","commit_id":"e272706de80edc3296893b2f0e318c32ba8a2df9"},{"author":{"_account_id":37306,"name":"Piotr Milewski","display_name":"Piotr Milewski","email":"vurmil@gmail.com","username":"vurmil"},"change_message_id":"3175d50c0ab5a60e7a59aa61d1a5ca91209c0ad8","unresolved":false,"context_lines":[{"line_number":36,"context_line":"      \"perm\": \"0664\","},{"line_number":37,"context_line":"      \"owner\": \"ansible:kolla\""},{"line_number":38,"context_line":"    }"},{"line_number":39,"context_line":"  ]"},{"line_number":40,"context_line":"}"}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"31982810_70fd0c2e","line":39,"in_reply_to":"f5041903_3b5d03f6","updated":"2025-05-19 18:16:23.000000000","message":"it can be done even more properly: https://paste.opendev.org/show/bFtSyiCyERQK8Ncbxhne/\n\njinja:\n{\n  \"command\": \"kolla_toolbox\",\n  \"config_files\": {{ config_files | to_nice_json }},\n  \"permissions\": [\n    {\n      \"path\": \"/var/log/kolla/ansible.log\",\n      \"perm\": \"0664\",\n      \"owner\": \"ansible:kolla\"\n    }\n  ]\n}\n\nvars/ - dictionary\nconfig_files:\n  {% set config_files \u003d [] %}\n  {% if enable_rabbitmq | bool %}\n    {% set _ \u003d config_files.append({\n      \"source\": container_config_directory ~ \"/rabbitmq-erlang.cookie\",\n      \"dest\": \"/var/lib/rabbitmq/.erlang.cookie\",\n      \"owner\": \"rabbitmq\",\n      \"perm\": \"0600\"\n    }) %}\n    {% set _ \u003d config_files.append({\n      \"source\": container_config_directory ~ \"/rabbitmq-env.conf\",\n      \"dest\": \"/etc/rabbitmq/rabbitmq-env.conf\",\n      \"owner\": \"rabbitmq\",\n      \"perm\": \"0600\"\n    }) %}\n    {% set _ \u003d config_files.append({\n      \"source\": container_config_directory ~ \"/erl_inetrc\",\n      \"dest\": \"/etc/rabbitmq/erl_inetrc\",\n      \"owner\": \"rabbitmq\",\n      \"perm\": \"0600\"\n    }) %}\n  {% endif %}\n  {% if kolla_copy_ca_into_containers | bool %}\n    {% set _ \u003d config_files.append({\n      \"source\": container_config_directory ~ \"/ca-certificates\",\n      \"dest\": \"/var/lib/kolla/share/ca-certificates\",\n      \"owner\": \"root\",\n      \"perm\": \"0600\"\n    }) %}\n  {% endif %}\n  {{ config_files }}","commit_id":"e272706de80edc3296893b2f0e318c32ba8a2df9"},{"author":{"_account_id":27339,"name":"Michal Arbet","email":"michal.arbet@ultimum.io","username":"michalarbet"},"change_message_id":"269205a535cc02a8f2b88e3447d348cfa5192e5a","unresolved":true,"context_lines":[{"line_number":18,"context_line":"            \"dest\": \"/etc/rabbitmq/erl_inetrc\","},{"line_number":19,"context_line":"            \"owner\": \"rabbitmq\","},{"line_number":20,"context_line":"            \"perm\": \"0600\""},{"line_number":21,"context_line":"        }{% endif %}{% if kolla_copy_ca_into_containers | bool %},"},{"line_number":22,"context_line":"        {"},{"line_number":23,"context_line":"            \"source\": \"{{ container_config_directory }}/ca-certificates\","},{"line_number":24,"context_line":"            \"dest\": \"/var/lib/kolla/share/ca-certificates\","}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"b027d225_ee6c89aa","side":"PARENT","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":66},"updated":"2025-05-21 15:04:19.000000000","message":"why to not change just this line to \n\n```        }{% endif %}{% if kolla_copy_ca_into_containers | bool %}{% if enable_rabbitmq | bool %},{% endif %}```\n\n??\n\nOne line change ?","commit_id":"dcafed414532c88b776ebe57743c84e57e330d39"},{"author":{"_account_id":37306,"name":"Piotr Milewski","display_name":"Piotr Milewski","email":"vurmil@gmail.com","username":"vurmil"},"change_message_id":"3f58715202c6180b4e45b8adf1c4a7cee6aaebe6","unresolved":false,"context_lines":[{"line_number":18,"context_line":"            \"dest\": \"/etc/rabbitmq/erl_inetrc\","},{"line_number":19,"context_line":"            \"owner\": \"rabbitmq\","},{"line_number":20,"context_line":"            \"perm\": \"0600\""},{"line_number":21,"context_line":"        }{% endif %}{% if kolla_copy_ca_into_containers | bool %},"},{"line_number":22,"context_line":"        {"},{"line_number":23,"context_line":"            \"source\": \"{{ container_config_directory }}/ca-certificates\","},{"line_number":24,"context_line":"            \"dest\": \"/var/lib/kolla/share/ca-certificates\","}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"764f1578_8c48fd13","side":"PARENT","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":66},"in_reply_to":"6b1ea32f_83271854","updated":"2025-05-21 15:40:45.000000000","message":"additionally to_nice_json and to_json out of the box take care of the commas for the JSON file","commit_id":"dcafed414532c88b776ebe57743c84e57e330d39"},{"author":{"_account_id":27339,"name":"Michal Arbet","email":"michal.arbet@ultimum.io","username":"michalarbet"},"change_message_id":"d00b5723ce3a8b9f32d9dacce558542a3b46e594","unresolved":false,"context_lines":[{"line_number":18,"context_line":"            \"dest\": \"/etc/rabbitmq/erl_inetrc\","},{"line_number":19,"context_line":"            \"owner\": \"rabbitmq\","},{"line_number":20,"context_line":"            \"perm\": \"0600\""},{"line_number":21,"context_line":"        }{% endif %}{% if kolla_copy_ca_into_containers | bool %},"},{"line_number":22,"context_line":"        {"},{"line_number":23,"context_line":"            \"source\": \"{{ container_config_directory }}/ca-certificates\","},{"line_number":24,"context_line":"            \"dest\": \"/var/lib/kolla/share/ca-certificates\","}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"58273813_b5bbe4d9","side":"PARENT","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":66},"in_reply_to":"764f1578_8c48fd13","updated":"2025-05-21 18:47:51.000000000","message":"yeah, maybe...but it\u0027s better to have it same as it is in other files. and it\u0027s easier to backport one line than multiple.\n\nfrom me +2 , thanks","commit_id":"dcafed414532c88b776ebe57743c84e57e330d39"},{"author":{"_account_id":37306,"name":"Piotr Milewski","display_name":"Piotr Milewski","email":"vurmil@gmail.com","username":"vurmil"},"change_message_id":"2b61a0b3f0d10f7ac98617351229eef640a6752a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"            \"dest\": \"/etc/rabbitmq/erl_inetrc\","},{"line_number":19,"context_line":"            \"owner\": \"rabbitmq\","},{"line_number":20,"context_line":"            \"perm\": \"0600\""},{"line_number":21,"context_line":"        }{% endif %}{% if kolla_copy_ca_into_containers | bool %},"},{"line_number":22,"context_line":"        {"},{"line_number":23,"context_line":"            \"source\": \"{{ container_config_directory }}/ca-certificates\","},{"line_number":24,"context_line":"            \"dest\": \"/var/lib/kolla/share/ca-certificates\","}],"source_content_type":"text/x-jinja2","patch_set":4,"id":"6b1ea32f_83271854","side":"PARENT","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":66},"in_reply_to":"b027d225_ee6c89aa","updated":"2025-05-21 15:36:49.000000000","message":"of course it is possible but. But in the absence of rabbitmaq the spaces from the 4th line (before {% if enable_rabbitmq | bool %}{) will move the curly bracket.\nhttps://paste.opendev.org/show/bCKhxDKHXeTfauNuMXKK/\n\nThere have always been problems with indentation with these config.json files for all services.\n\nThat is why I proposed another solution that will take care of indentation and spaces.\n\nIn the comment I posted a link to how it should actually be done.\ndictionary - vars\ntemplates - only jinja template\n\nhttps://paste.opendev.org/show/bFtSyiCyERQK8Ncbxhne/","commit_id":"dcafed414532c88b776ebe57743c84e57e330d39"}]}
