FIX: More security hardening
[ta/infra-ansible.git] / playbooks / single_node_storage.yml
1 # cmframework.requires:baremetal-install.yml,baremetal-interface-config.yml,performance-kernel-cmdline-set.yml,ntp-config.yml
2 ---
3
4 # Copyright 2019 Nokia
5
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #     http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17
18 - hosts: openstack_nodes
19   become: yes
20   become_method: sudo
21   become_user: root
22   gather_facts: no
23   roles:
24     - role: cleanup_disks
25       vars:
26         disks: "{{ devices }}"
27       when:
28         - devices is defined
29         - one_controller_node_config | bool
30
31 - include: single_node_partitions.yml
32   when:
33     - one_controller_node_config | bool
34     - lvm_configured | default(False)
35
36 - include: single_node_volume_groups.yml
37   when:
38     - one_controller_node_config | bool
39     - lvm_configured | default(False)
40
41 - include: glance-lvm.yml
42   vars:
43     all_disk_size_for_volume_group_vg: "1"
44   when:
45     - one_controller_node_config | bool
46     - lvm_configured | default(False)
47     - rootdisk_vg_percentage != all_disk_size_for_volume_group_vg