| # Copyright (c) 2024 VEXXHOST, Inc. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| # not use this file except in compliance with the License. You may obtain |
| # a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| # License for the specific language governing permissions and limitations |
| # under the License. |
| |
| - name: Configure hostname |
| hosts: all |
| tasks: |
| - name: Configure short hostname |
| ansible.builtin.hostname: |
| name: "{{ inventory_hostname_short }}" |
| |
| - name: Ensure hostname inside hosts file |
| ansible.builtin.lineinfile: |
| path: /etc/hosts |
| regexp: '^127\.0\.1\.1' |
| line: 127.0.1.1 {{ inventory_hostname }} {{ inventory_hostname_short }} |
| |
| - name: Create fake devices for Ceph |
| ansible.builtin.import_playbook: vexxhost.ceph.create_fake_devices |
| |
| - name: Prepare system for Neutron |
| ansible.builtin.import_playbook: ../shared/prepare/neutron.yml |
| |
| # TODO(mnaser): Drop this once we switch to vexxhost.ceph 3.0.0 |
| - name: Configure Ceph workarounds |
| hosts: cephs |
| roles: |
| - vexxhost.ceph.repository |
| post_tasks: |
| - name: Install "ceph-volume" |
| ansible.builtin.package: |
| name: ceph-volume |
| state: present |
| vars: |
| ceph_version: 18.2.1 |