Mohammed Naser | 85fc1bf | 2023-03-27 20:56:19 +0000 | [diff] [blame] | 1 | # Copyright (c) 2023 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 | |
| 15 | - name: Create flavor |
| 16 | run_once: true |
| 17 | openstack.cloud.compute_flavor: |
| 18 | cloud: atmosphere |
| 19 | name: "{{ manila_flavor_name }}" |
| 20 | vcpus: "{{ manila_flavor_vcpus }}" |
| 21 | ram: "{{ manila_flavor_ram }}" |
| 22 | disk: "{{ manila_flavor_disk }}" |
| 23 | is_public: false |
thywyn | bee9ae0 | 2023-12-22 16:51:25 +0000 | [diff] [blame] | 24 | extra_specs: "{{ manila_flavor_extra_specs }}" |
Mohammed Naser | 85fc1bf | 2023-03-27 20:56:19 +0000 | [diff] [blame] | 25 | register: _manila_flavor |
| 26 | |
| 27 | - name: Upload service image |
| 28 | ansible.builtin.include_role: |
| 29 | name: glance_image |
| 30 | vars: |
| 31 | glance_image_name: "{{ manila_image_name }}" |
| 32 | glance_image_url: "{{ manila_image_url }}" |
| 33 | glance_image_container_format: "{{ manila_image_container_format }}" |
| 34 | glance_image_disk_format: "{{ manila_image_disk_format }}" |
Rico Lin | 89db97f | 2023-05-18 01:08:31 +0800 | [diff] [blame] | 35 | |
| 36 | - name: Create generic share driver security group |
| 37 | openstack.cloud.security_group: |
| 38 | cloud: atmosphere |
| 39 | name: manila-service-security-group |
| 40 | project: service |
| 41 | register: _manila_service_security_group |
| 42 | |
| 43 | - name: Create generic share driver security group tcp rules |
| 44 | openstack.cloud.security_group_rule: |
| 45 | cloud: atmosphere |
Mohammed Naser | 8ccabb6 | 2025-02-05 13:20:09 -0500 | [diff] [blame] | 46 | security_group: "{{ _manila_service_security_group.security_group.id }}" |
Rico Lin | 89db97f | 2023-05-18 01:08:31 +0800 | [diff] [blame] | 47 | direction: ingress |
| 48 | ethertype: IPv4 |
| 49 | protocol: tcp |
| 50 | project: service |
| 51 | port_range_min: "{{ item }}" |
| 52 | port_range_max: "{{ item }}" |
| 53 | loop: |
| 54 | - 22 |
| 55 | - 111 |
| 56 | - 2049 |
| 57 | |
| 58 | - name: Create generic share driver security group icmp rules |
| 59 | openstack.cloud.security_group_rule: |
| 60 | cloud: atmosphere |
Mohammed Naser | 8ccabb6 | 2025-02-05 13:20:09 -0500 | [diff] [blame] | 61 | security_group: "{{ _manila_service_security_group.security_group.id }}" |
Rico Lin | 89db97f | 2023-05-18 01:08:31 +0800 | [diff] [blame] | 62 | direction: ingress |
| 63 | ethertype: IPv4 |
| 64 | protocol: icmp |
| 65 | project: service |