| # Copyright (c) 2023 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: Create flavor |
| run_once: true |
| openstack.cloud.compute_flavor: |
| cloud: atmosphere |
| name: "{{ manila_flavor_name }}" |
| vcpus: "{{ manila_flavor_vcpus }}" |
| ram: "{{ manila_flavor_ram }}" |
| disk: "{{ manila_flavor_disk }}" |
| is_public: false |
| extra_specs: "{{ manila_flavor_extra_specs }}" |
| register: _manila_flavor |
| |
| - name: Upload service image |
| ansible.builtin.include_role: |
| name: glance_image |
| vars: |
| glance_image_name: "{{ manila_image_name }}" |
| glance_image_url: "{{ manila_image_url }}" |
| glance_image_container_format: "{{ manila_image_container_format }}" |
| glance_image_disk_format: "{{ manila_image_disk_format }}" |
| |
| - name: Create generic share driver security group |
| openstack.cloud.security_group: |
| cloud: atmosphere |
| name: manila-service-security-group |
| project: service |
| register: _manila_service_security_group |
| |
| - name: Create generic share driver security group tcp rules |
| openstack.cloud.security_group_rule: |
| cloud: atmosphere |
| security_group: "{{ _manila_service_security_group.security_group.id }}" |
| direction: ingress |
| ethertype: IPv4 |
| protocol: tcp |
| project: service |
| port_range_min: "{{ item }}" |
| port_range_max: "{{ item }}" |
| loop: |
| - 22 |
| - 111 |
| - 2049 |
| |
| - name: Create generic share driver security group icmp rules |
| openstack.cloud.security_group_rule: |
| cloud: atmosphere |
| security_group: "{{ _manila_service_security_group.security_group.id }}" |
| direction: ingress |
| ethertype: IPv4 |
| protocol: icmp |
| project: service |