)]}'
{"tripleo_ansible/roles/tripleo_hosts_entries/tasks/main.yml":[{"author":{"_account_id":8833,"name":"Rabi Mishra","email":"ramishra@redhat.com","username":"rabi"},"change_message_id":"3b9604e68d73905c3e4fa8a1a0c07835e0a15416","unresolved":true,"context_lines":[{"line_number":86,"context_line":"      {{ host }}"},{"line_number":87,"context_line":"      {% endfor %}"},{"line_number":88,"context_line":"    marker: \"# {mark}\""},{"line_number":89,"context_line":"    marker_begin: \"START_HOST_ENTRIES_FOR_STACK: {{ tripleo_stack_name | default(plan) }}\""},{"line_number":90,"context_line":"    marker_end: \"END_HOST_ENTRIES_FOR_STACK: {{ tripleo_stack_name | default(plan) }}\""},{"line_number":91,"context_line":"  register: tripleo_hosts_entries_new_entries"},{"line_number":92,"context_line":"  tags:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"bd22bd8b_becebe32","line":89,"range":{"start_line":89,"start_character":81,"end_line":89,"end_character":85},"updated":"2021-04-22 03:51:45.000000000","message":"What\u0027s \u0027plan\u0027 here? Is it an ansible var. If we can leave that part I guess.","commit_id":"9879d3b5db84e25853f4968314a6843f7fd41353"},{"author":{"_account_id":30073,"name":"Brendan Shephard","email":"bshephar@bne-home.net","username":"bshephar"},"change_message_id":"2281f596e9e370a45eb4e51c2f95a3aff9d940ae","unresolved":true,"context_lines":[{"line_number":86,"context_line":"      {{ host }}"},{"line_number":87,"context_line":"      {% endfor %}"},{"line_number":88,"context_line":"    marker: \"# {mark}\""},{"line_number":89,"context_line":"    marker_begin: \"START_HOST_ENTRIES_FOR_STACK: {{ tripleo_stack_name | default(plan) }}\""},{"line_number":90,"context_line":"    marker_end: \"END_HOST_ENTRIES_FOR_STACK: {{ tripleo_stack_name | default(plan) }}\""},{"line_number":91,"context_line":"  register: tripleo_hosts_entries_new_entries"},{"line_number":92,"context_line":"  tags:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"b605ece7_5ac8a33a","line":89,"range":{"start_line":89,"start_character":81,"end_line":89,"end_character":85},"in_reply_to":"bd22bd8b_becebe32","updated":"2021-04-22 06:45:38.000000000","message":"Yeah, it\u0027s all fine for the undercloud deployment - it just works with tripleo_stack_name since we define it group_vars:\nhttps://e608d695eeb6d3c4bfc1-199a42e1d3446a797345a32d3ae04761.ssl.cf5.rackcdn.com/787327/2/check/tripleo-ci-centos-8-containers-multinode/a524995/logs/undercloud/home/zuul/tripleo-deploy/undercloud/undercloud-ansible-8r0erxl5/group_vars/Undercloud\n\nBut when we deploy the overcloud, it writes RoleGroupVars only for the overcloud roles:\n\n$ ls overcloud-deploy/overcloud/config-download/overcloud/group_vars/\nCompute  ComputeDell  Controller\n\nBut the tripleo_hosts_entries Ansible role will be executed against the undercloud as well during the overcloud deployment. This means that it fails with tripleo_stack_name is undefined. So, to overcome that, I need to find a variable that is available to the undercloud node, but during the overcloud deployment. That is conveniently located here:\nhttps://github.com/openstack/tripleo-common/blob/master/tripleo_common/inventory.py#L662\n\n(bne-home) [stack@tripleo-director ~]$ head -n20 overcloud-deploy/overcloud/config-download/overcloud/tripleo-ansible-inventory.yaml\nUndercloud:\n  hosts:\n    undercloud: {}\n  vars:\n    ansible_connection: local\n    ansible_host: localhost\n    ansible_python_interpreter: /usr/libexec/platform-python\n    ansible_remote_tmp: /tmp/ansible-${USER}\n    auth_url: https://192.168.24.2:13000\n    overcloud_admin_password: C3I4ZItmWDOrxBsfjlPCWyx1M\n    overcloud_horizon_url: https://openstack.bne-home.net:443/dashboard\n    overcloud_keystone_url: https://openstack.bne-home.net:13000\n    plan: overcloud       \u003c\u003c\u003c\u003c\u003c-----------------------\n    project_name: admin\n\n\nSo I\u0027m leveraging that plan variable as the fallback when tripleo_stack_name isn\u0027t available. I mean, I can add a change to tripleo_common as well to change this variable name tripleo_stack_name as well. I\u0027ll just need to figure out if there is anything relying on it and do some testing. \n\nSince we don\u0027t create group_vars for the undercloud during a overcloud deployment. I guess the inventory or an environment variable would be the only way to overcome that challenge?","commit_id":"9879d3b5db84e25853f4968314a6843f7fd41353"}]}
