{"id":118,"sha1":"81386938ad0829df62cf73c395dbee794e47d0b3","playbook":{"id":2,"items":{"plays":18,"tasks":603,"results":2798,"hosts":18,"files":138,"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":8,"module_path":null,"syntax":false,"listtasks":false,"listtags":false,"step":false,"start_at_task":null,"args":["setup-hosts.yml"]},"labels":[{"id":1,"name":"check:False"},{"id":2,"name":"tags:all"}],"started":"2025-12-15T09:38:00.537317Z","ended":"2025-12-15T09:55:23.220443Z","duration":"00:17:22.683126","name":null,"ansible_version":"2.18.6","client_version":"1.7.4","python_version":"3.12.3","server_version":"1.7.4","status":"completed","path":"/home/zuul/src/opendev.org/openstack/openstack-ansible/playbooks/setup-hosts.yml","controller":"aio1.openstack.local","user":"root"},"content":"---\n# Copyright 2015, Rackspace US, 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# NOTE(cloudnull): We're using rsync  and an if block because we've no means\n#                  to loop over a block. Re-evaluate this task when/if this is\n#                  merged https://github.com/ansible/ansible/issues/13262\n- name: Rsyncing files from the LXC host to the container cache\n  ansible.builtin.shell: |\n    if [[ -e \"{{ item }}\" ]]; then\n      rsync -av \"{{ item }}\" \"{{ lxc_image_cache_path }}{{ item }}\"\n    else\n      exit 3\n    fi\n  changed_when: _rsync_container_cache.rc == 0\n  failed_when: _rsync_container_cache.rc not in [0, 3]\n  register: _rsync_container_cache\n  args:\n    executable: \"/bin/bash\"\n  with_items: \"{{ (_lxc_copy_from_host | union(lxc_container_cache_files_from_host)) | list }}\"\n\n- name: Ensure directories exist for lxc_container_cache_files\n  ansible.builtin.file:\n    dest: \"{{ lxc_image_cache_path }}{{ item.dest | default(item.src) | dirname }}\"\n    state: directory\n    mode: \"0755\"\n  with_items: \"{{ lxc_container_cache_files }}\"\n\n- name: Copy files from deployment host to the container cache\n  ansible.builtin.copy:\n    src: \"{{ item.src }}\"\n    dest: \"{{ lxc_image_cache_path }}{{ item.dest | default(item.src) }}\"\n    owner: \"{{ item.owner | default('root') }}\"\n    group: \"{{ item.group | default('root') }}\"\n    mode: \"{{ item.mode | default('0644') }}\"\n  with_items: \"{{ lxc_container_cache_files }}\"\n\n- name: Ensure opt directory exists in container\n  ansible.builtin.file:\n    dest: \"{{ lxc_image_cache_path }}/opt\"\n    state: directory\n    mode: \"0755\"\n\n- name: Cached image preparation script\n  ansible.builtin.template:\n    src: \"{{ lxc_cache_prep_template }}\"\n    dest: \"{{ lxc_image_cache_path }}/opt/cache-prep-commands.sh\"\n    mode: \"0755\"\n\n# This task runs several commands against the cached image to speed up the\n# lxc_container_create playbook.\n- name: Prepare cached image setup commands\n  ansible.builtin.shell: \"chroot {{ lxc_image_cache_path }} /opt/cache-prep-commands.sh > /var/log/lxc-cache-prep-commands.log 2>&1\"\n  changed_when: false\n  async: \"{{ lxc_cache_prep_timeout | int }}\"\n  poll: 0\n  register: _lxc_cache_prepare_commands\n\n# NOTE(cloudnull): Wait for the cache preparation script has completed before\n#                  building the new RootFS\n- name: Ensure that the LXC cache has been prepared\n  ansible.builtin.async_status:\n    jid: \"{{ _lxc_cache_prepare_commands.ansible_job_id }}\"\n  register: _lxc_cache_prepare_commands_result\n  until: _lxc_cache_prepare_commands_result.finished\n  delay: 10\n  retries: \"{{ lxc_cache_prep_timeout | int // 10 }}\"\n\n- name: Remove requiretty for sudo on centos\n  ansible.builtin.template:\n    dest: \"{{ lxc_image_cache_path }}/etc/sudoers.d/openstack-ansible\"\n    owner: root\n    group: root\n    mode: \"0440\"\n    src: sudoers.j2\n  when:\n    - ansible_facts['pkg_mgr'] == 'dnf'\n","created":"2025-12-15T09:44:48.609098Z","updated":"2025-12-15T09:44:48.609126Z","path":"/home/zuul/src/opendev.org/openstack/openstack-ansible-lxc_hosts/tasks/lxc_cache_preparation.yml"}