blob: 08c5278920cb78639887243a4931a18d1da84c4a [file] [log] [blame]
Mohammed Naser85fc1bf2023-03-27 20:56:19 +00001# 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
thywynbee9ae02023-12-22 16:51:25 +000024 extra_specs: "{{ manila_flavor_extra_specs }}"
Mohammed Naser85fc1bf2023-03-27 20:56:19 +000025 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 Lin89db97f2023-05-18 01:08:31 +080035
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 Naser8ccabb62025-02-05 13:20:09 -050046 security_group: "{{ _manila_service_security_group.security_group.id }}"
Rico Lin89db97f2023-05-18 01:08:31 +080047 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 Naser8ccabb62025-02-05 13:20:09 -050061 security_group: "{{ _manila_service_security_group.security_group.id }}"
Rico Lin89db97f2023-05-18 01:08:31 +080062 direction: ingress
63 ethertype: IPv4
64 protocol: icmp
65 project: service