{"id":777,"sha1":"915f04aa29d396a265afaa094ea39220d7363c20","playbook":{"id":4,"items":{"plays":107,"tasks":2438,"results":2413,"hosts":13,"files":511,"records":0},"arguments":{"version":null,"verbosity":0,"private_key_file":null,"remote_user":null,"connection":"openstack.osa.ssh","timeout":null,"ssh_common_args":null,"sftp_extra_args":null,"scp_extra_args":null,"ssh_extra_args":null,"ask_pass":false,"connection_password_file":null,"force_handlers":true,"flush_cache":false,"become":false,"become_method":"sudo","become_user":null,"become_ask_pass":false,"become_password_file":null,"tags":["all"],"skip_tags":[],"check":false,"diff":false,"inventory":["/home/zuul/src/opendev.org/openstack/openstack-ansible/inventory/dynamic_inventory.py","/home/zuul/src/opendev.org/openstack/openstack-ansible/inventory/inventory.ini","/etc/openstack_deploy/inventory.ini"],"listhosts":false,"subset":null,"extra_vars":"Not saved by ARA as configured by 'ignored_arguments'","vault_ids":[],"ask_vault_pass":false,"vault_password_files":[],"forks":4,"module_path":null,"syntax":false,"listtasks":false,"listtags":false,"step":false,"start_at_task":null,"args":["setup-openstack.yml"]},"labels":[{"id":1,"name":"check:False"},{"id":2,"name":"tags:all"}],"started":"2025-12-14T10:21:40.790759Z","ended":"2025-12-14T11:05:36.775743Z","duration":"00:43:55.984984","name":null,"ansible_version":"2.18.6","client_version":"1.7.4","python_version":"3.13.5","server_version":"1.7.4","status":"completed","path":"/home/zuul/src/opendev.org/openstack/openstack-ansible/playbooks/setup-openstack.yml","controller":"aio1.openstack.local","user":"root"},"content":"---\n# Copyright 2014, Rackspace US, Inc.\n# Copyright 2018, Red Hat, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n- name: Create tempest directories\n  ansible.builtin.file:\n    path: \"{{ item.path }}\"\n    state: directory\n    owner: \"{{ item.owner | default(omit) }}\"\n    group: \"{{ item.group | default(omit) }}\"\n    mode: \"{{ item.mode | default('0755') }}\"\n  with_items:\n    - path: \"{{ tempest_log_dir | realpath }}\"\n      owner: root\n    - path: \"{{ tempest_image_dir }}\"\n    - path: \"{{ tempest_workspace }}\"\n    - path: \"/etc/tempest\"\n      owner: root\n      group: root\n\n- name: Copy tempest config\n  openstack.config_template.config_template:\n    src: \"tempest.conf.j2\"\n    dest: \"/etc/tempest/tempest.conf\"\n    owner: \"root\"\n    group: \"root\"\n    mode: \"0644\"\n    config_overrides: \"{{ _tempest_tempest_conf_overrides_gathered }}\"\n    config_type: \"ini\"\n  register: copy_tempest_config\n  when: not tempest_use_tempestconf | bool\n\n- name: Move over workspace when config is updated\n  ansible.builtin.shell: |\n    set -e\n\n    if [ -d  {{ tempest_venv_bin }} ]; then\n        . {{ tempest_venv_bin }}/activate\n    else\n       exit 0\n    fi\n\n    if tempest workspace list | grep ' workspace '; then\n\n        # Get a backup suffix\n        export CURDATE=$(date +\"%d%^b%g_%H%M%S%Z\")\n\n        # Get the dirname for 'workspace' directly from the tempest workspace list\n        WSPATH=$(dirname $(tempest workspace list | awk '{if($2 == \"workspace\"){print $4}}'))\n\n        # Rename the workspace\n        tempest workspace rename --old-name workspace --new-name workspace_${CURDATE}\n\n        # A workspace move only changes the config.  The move happens manually.\n        if [ -d \"${WSPATH}/workspace\" ]\n        then\n            mv ${WSPATH}/workspace ${WSPATH}/workspace_${CURDATE}\n            tempest workspace move --name workspace_${CURDATE} --path ${WSPATH}/workspace_${CURDATE}/\n        fi\n\n        exit 3\n    fi\n  args:\n    executable: /bin/bash\n  register: tempest_move_workspace\n  changed_when: tempest_move_workspace.rc == 3\n  failed_when:\n    - tempest_move_workspace.rc != 0\n    - tempest_move_workspace.rc != 3\n  when:\n    - not tempest_use_tempestconf | bool\n    - copy_tempest_config is changed\n  tags:\n    # don't trigger ANSIBLE0016\n    - skip_ansible_lint\n\n- name: Initialise tempest workspace\n  ansible.builtin.shell: |\n    set -e\n    if [ ! -d {{ tempest_workspace }}/etc ]; then\n        if [ -d {{ tempest_venv_bin }} ]; then\n            . {{ tempest_venv_bin }}/activate\n        fi\n        # (guilhermesp) We are adding this conditional here to avoid\n        # breakage when we are upgrade from rocky to stein as the workspace\n        # path has been change between these two releases\n        if tempest workspace list | grep ' workspace '; then\n            # Init not working on existing entry. Renme old workspace instead and init new.\n            export CURDATE=$(date +\"%d%^b%g_%H%M%S%Z\")\n            WSPATH=$(dirname $(tempest workspace list | awk '{if($2 == \"workspace\"){print $4}}'))\n\n            tempest workspace rename --old-name workspace --new-name workspace_${CURDATE}\n\n            mv ${WSPATH}/workspace ${WSPATH}/workspace_${CURDATE}\n            tempest workspace move --name workspace_${CURDATE} --path ${WSPATH}/workspace_${CURDATE}/\n            tempest init ${CURWORKSPACE}\n        else\n            tempest init --name workspace {{ tempest_workspace }}\n            exit 3\n        fi\n    fi\n  args:\n    executable: /bin/bash\n  register: tempest_init_workspace\n  changed_when: tempest_init_workspace.rc == 3\n  failed_when:\n    - tempest_init_workspace.rc != 0\n    - tempest_init_workspace.rc != 3\n  tags:\n    # don't trigger ANSIBLE0013\n    - skip_ansible_lint\n\n- name: Importing tempestconf tasks\n  ansible.builtin.import_tasks: tempestconf.yml\n  when: tempest_use_tempestconf | bool\n  tags:\n    - tempest-config\n    - tempestconf\n\n- name: List installed tempest plugins\n  ansible.builtin.shell: |\n    set -e\n    if [ -d {{ tempest_venv_bin }} ]; then\n       . {{ tempest_venv_bin }}/activate\n    fi\n    tempest list-plugins\n  changed_when: false\n  args:\n    executable: /bin/bash\n  when: \"debug | bool\"\n\n- name: List tempest tests\n  ansible.builtin.shell: |\n    set -e\n    if [ -d {{ tempest_venv_bin }} ];\n    then\n      . {{ tempest_venv_bin }}/activate\n    fi\n    tempest run -l\n  args:\n    chdir: \"{{ tempest_workspace }}\"\n    executable: /bin/bash\n  when: \"debug | bool\"\n  changed_when: false\n\n- name: Generate tempest test include list\n  ansible.builtin.copy:\n    content: |\n      {% for item in (_tempest_test_includelist + tempest_test_extra_test) | unique | sort %}\n      {%   if item %}\n      {{ item }}\n      {%   endif %}\n      {% endfor %}\n    dest: \"{{ tempest_includelist_file_path }}\"\n    mode: \"0644\"\n  when:\n    - _tempest_test_includelist | length > 0\n\n# Tests to NOT execute:\n# This sets up a list of tests to skip, which can even include those included in the includelist.\n- name: Generate tempest test exclude list\n  ansible.builtin.copy:\n    content: |\n      {% for item in _tempest_test_excludelist %}\n      {% if item.test is defined %}\n      {{ item.test }}\n      {% else %}\n      {{ item }}\n      {%   endif %}\n      {% endfor %}\n    dest: \"{{ tempest_excludelist_file_path }}\"\n    mode: \"0644\"\n  when:\n    - _tempest_test_excludelist | length > 0\n\n- name: Remove tempest test exclude list when there are no exclusions\n  ansible.builtin.file:\n    path: \"{{ tempest_excludelist_file_path }}\"\n    state: absent\n  when:\n    - _tempest_test_excludelist | length == 0\n\n- name: Drop test_accounts_file\n  ansible.builtin.copy:\n    content: \"{{ tempest_test_accounts }}\"\n    dest: \"{{ tempest_test_accounts_file_path }}\"\n    mode: \"0644\"\n  when:\n    - tempest_test_accounts | length > 0\n","created":"2025-12-14T10:21:59.080289Z","updated":"2025-12-14T10:21:59.080301Z","path":"/home/zuul/src/opendev.org/openstack/openstack-ansible-os_tempest/tasks/tempest_post_install.yml"}