9c87fb8c87
- [openstack_user_config]: remove NFS in favor of (properly isntalled) iscsi - [openstack_user_config]: remove extraneous config in favor of shorter version - [storage] install and enable targetd (target.service) - [ansible] only run 'infra' tags on the first infra host - never on an AIO - [ansible] change roles to use the ``host`` extra var to configure where to run to mitigate accidents - [ansible] add aio steps to infra playbook - [ansible] add storage host playbook to configure volumes and iscsi - [ansible] aio: configure volume groups
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
---
|
|
# Setup the storage host. Install targetcli and make sure any volumes are mounted.
|
|
|
|
- name: Storage Host Configuration
|
|
hosts: storage1
|
|
become: true
|
|
|
|
handlers:
|
|
- import_tasks: handlers/main.yml
|
|
|
|
pre_tasks:
|
|
- name: Check if ansible cannot be run here
|
|
stat:
|
|
path: /etc/no-ansible
|
|
register: no_ansible
|
|
|
|
- name: Verify if we can run ansible
|
|
assert:
|
|
that:
|
|
- "not no_ansible.stat.exists"
|
|
success_msg: "We are able to run on this node"
|
|
fail_msg: "/etc/no-ansible exists - skipping run on this node"
|
|
|
|
tasks:
|
|
- name: Loading Variables from OS Common
|
|
import_tasks: tasks/common_vars.yml
|
|
|
|
- name: Install required packages
|
|
become: true
|
|
dnf:
|
|
name: targetcli
|
|
notify: enable_targetd
|
|
|
|
- name: Create volume group for cinder
|
|
lvg:
|
|
pv_options: --metadatasize=2048
|
|
pvs: "{{ cinder_pv_device | default('/dev/vdb') }}"
|
|
vg: cinder-volumes
|
|
|
|
|
|
post_tasks:
|
|
- name: Touching run file that ansible has ran here
|
|
file:
|
|
path: /var/log/ansible.run
|
|
state: touch
|
|
mode: '0644'
|
|
owner: root
|
|
group: root
|
|
...
|