Mohammed Naser | 1220717 | 2024-02-05 18:49:35 -0500 | [diff] [blame] | 1 | # Copyright (c) 2024 VEXXHOST, Inc. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | |
Rico Lin | e713267 | 2024-02-28 00:10:53 +0800 | [diff] [blame] | 15 | - name: Configure hostname |
| 16 | hosts: all |
| 17 | tasks: |
| 18 | - name: Configure short hostname |
| 19 | ansible.builtin.hostname: |
| 20 | name: "{{ inventory_hostname_short }}" |
| 21 | |
| 22 | - name: Ensure hostname inside hosts file |
| 23 | ansible.builtin.lineinfile: |
| 24 | path: /etc/hosts |
| 25 | regexp: '^127\.0\.1\.1' |
| 26 | line: 127.0.1.1 {{ inventory_hostname }} {{ inventory_hostname_short }} |
| 27 | |
Mohammed Naser | 1220717 | 2024-02-05 18:49:35 -0500 | [diff] [blame] | 28 | - name: Create fake devices for Ceph |
| 29 | ansible.builtin.import_playbook: vexxhost.ceph.create_fake_devices |
| 30 | |
| 31 | - name: Prepare system for Neutron |
| 32 | ansible.builtin.import_playbook: ../shared/prepare/neutron.yml |
| 33 | |
| 34 | # TODO(mnaser): Drop this once we switch to vexxhost.ceph 3.0.0 |
| 35 | - name: Configure Ceph workarounds |
| 36 | hosts: cephs |
| 37 | roles: |
| 38 | - vexxhost.ceph.repository |
| 39 | post_tasks: |
| 40 | - name: Install "ceph-volume" |
| 41 | ansible.builtin.package: |
| 42 | name: ceph-volume |
| 43 | state: present |
| 44 | vars: |
| 45 | ceph_version: 18.2.1 |