{"id":281,"sha1":"145b1f6f9852f104d323bdda4733f59d4888c6a1","playbook":{"id":3,"items":{"plays":37,"tasks":374,"results":364,"hosts":2,"files":208,"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-infrastructure.yml"]},"labels":[{"id":1,"name":"check:False"},{"id":2,"name":"tags:all"}],"started":"2025-12-08T13:33:24.432723Z","ended":"2025-12-08T13:39:38.483304Z","duration":"00:06:14.050581","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-infrastructure.yml","controller":"aio1.openstack.local","user":"root"},"content":"---\n# Copyright 2024, BBC R&D\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 ceph pools\n  hosts: \"{{ groups['ceph-mon'][0] | default([]) }}\"\n  user: root\n  gather_facts: false\n  vars:\n    is_metal: \"{{ properties.is_metal|default(false) }}\"\n  vars_files:\n    - \"defaults/{{ install_method }}_install.yml\"\n  pre_tasks:\n    - name: Define discovered_interpreter_python\n      ansible.builtin.set_fact:\n        discovered_interpreter_python: /usr/bin/python3\n  roles:\n    - role: ceph-defaults\n      tags:\n        - skip_ansible_lint\n  tasks:\n    - name: Create openstack pool(s)\n      ceph_pool:\n        name: \"{{ item.name }}\"\n        cluster: \"{{ cluster }}\"\n        pg_num: \"{{ item.pg_num | default(omit) }}\"\n        pgp_num: \"{{ item.pgp_num | default(omit) }}\"\n        size: \"{{ item.size | default(omit) }}\"\n        min_size: \"{{ item.min_size | default(omit) }}\"\n        pool_type: \"{{ item.type | default('replicated') }}\"\n        rule_name: \"{{ item.rule_name | default(omit) }}\"\n        erasure_profile: \"{{ item.erasure_profile | default(omit) }}\"\n        pg_autoscale_mode: \"{{ item.pg_autoscale_mode | default(omit) }}\"\n        target_size_ratio: \"{{ item.target_size_ratio | default(omit) }}\"\n        application: \"{{ item.application | default(omit) }}\"\n      with_items: \"{{ openstack_pools }}\"\n\n    - name: Generate keys\n      ceph_key:\n        name: \"{{ item.name }}\"\n        caps: \"{{ item.caps }}\"\n        secret: \"{{ item.key | default('') }}\"\n        cluster: \"{{ cluster }}\"\n        mode: \"{{ item.mode | default(ceph_keyring_permissions) }}\"\n      with_items: \"{{ openstack_keys }}\"\n      no_log: \"{{ no_log_on_ceph_key_tasks }}\"\n\n    - name: Get keys from monitors\n      ceph_key:\n        name: \"{{ item.name }}\"\n        cluster: \"{{ cluster }}\"\n        output_format: plain\n        state: info\n      register: _osp_keys\n      with_items: \"{{ openstack_keys }}\"\n      no_log: \"{{ no_log_on_ceph_key_tasks }}\"\n\n    - name: Distribute ceph keys to all mons\n      ansible.builtin.copy:\n        dest: \"/etc/ceph/{{ cluster }}.{{ item.0.item.name }}.keyring\"\n        content: \"{{ item.0.stdout + '\\n' }}\"\n        owner: 'ceph'\n        group: 'ceph'\n        mode: \"{{ item.0.item.mode | default(ceph_keyring_permissions) }}\"\n      with_nested:\n        - \"{{ _osp_keys.results }}\"\n        - \"{{ groups['ceph-mon'] }}\"\n      delegate_to: \"{{ item.1 }}\"\n      no_log: \"{{ no_log_on_ceph_key_tasks }}\"\n","created":"2025-12-08T13:33:31.538503Z","updated":"2025-12-08T13:33:31.538533Z","path":"/etc/ansible/ansible_collections/openstack/osa/playbooks/ceph_pools.yml"}