Add centos support for os_cinder role
Add basic centos support for cinder role Change-Id: I21f84809c44ac4be0165fadfb8da67bbcbc9b05c
This commit is contained in:
parent
640b768e3d
commit
f420900880
@ -23,6 +23,6 @@
|
||||
|
||||
- name: Ensure tgt service restarted
|
||||
service:
|
||||
name: tgt
|
||||
name: "{{ tgt_service_name }}"
|
||||
state: restarted
|
||||
pattern: tgtd
|
||||
|
@ -24,6 +24,9 @@ galaxy_info:
|
||||
versions:
|
||||
- trusty
|
||||
- xenial
|
||||
- name: EL
|
||||
versions:
|
||||
- 7
|
||||
categories:
|
||||
- cloud
|
||||
- python
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- CentOS7/RHEL support has been added to the os_cinder
|
||||
role.
|
@ -17,6 +17,10 @@
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
|
||||
- include: cinder_install_yum.yml
|
||||
when:
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
|
||||
- name: Create developer mode constraint file
|
||||
copy:
|
||||
dest: "/opt/developer-pip-constraints.txt"
|
||||
|
50
tasks/cinder_install_yum.yml
Normal file
50
tasks/cinder_install_yum.yml
Normal file
@ -0,0 +1,50 @@
|
||||
---
|
||||
#copyright 2016, Rackspace US, 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: Install yum packages
|
||||
yum:
|
||||
pkg: "{{ item }}"
|
||||
state: "{{ cinder_package_state }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ cinder_distro_packages }}"
|
||||
|
||||
- name: Install yum packages common between different backends
|
||||
yum:
|
||||
pkg: "{{ item }}"
|
||||
state: "{{ cinder_package_state }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ cinder_volume_distro_packages }}"
|
||||
when:
|
||||
- inventory_hostname in groups['cinder_volume']
|
||||
|
||||
- name: Install yum packages for LVM backend
|
||||
yum:
|
||||
pkg: "{{ item }}"
|
||||
state: "{{ cinder_package_state }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ cinder_lvm_volume_distro_packages }}"
|
||||
when:
|
||||
- inventory_hostname in groups['cinder_volume']
|
||||
- cinder_backend_lvm_inuse | bool
|
||||
|
@ -20,6 +20,7 @@
|
||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||
- "{{ ansible_distribution | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
||||
- "{{ ansible_os_family | lower }}.yml"
|
||||
tags:
|
||||
- always
|
||||
|
@ -42,6 +42,7 @@
|
||||
login_host: "{{ cinder_galera_address }}"
|
||||
name: "{{ cinder_galera_database }}"
|
||||
state: "present"
|
||||
delegate_to: "10.100.100.2"
|
||||
when: inventory_hostname == groups['cinder_all'][0]
|
||||
tags:
|
||||
- mysql-db-setup
|
||||
@ -55,6 +56,7 @@
|
||||
host: "{{ item }}"
|
||||
state: "present"
|
||||
priv: "{{ cinder_galera_database }}.*:ALL"
|
||||
delegate_to: "10.100.100.2"
|
||||
when: inventory_hostname == groups['cinder_all'][0]
|
||||
with_items:
|
||||
- "localhost"
|
||||
|
@ -39,7 +39,7 @@
|
||||
mysql_db:
|
||||
login_user: "root"
|
||||
login_password: "secrete"
|
||||
login_host: "localhost"
|
||||
login_host: "{{ keystone_galera_address }}"
|
||||
name: "{{ keystone_galera_database }}"
|
||||
state: "present"
|
||||
delegate_to: "10.100.100.2"
|
||||
@ -48,7 +48,7 @@
|
||||
mysql_user:
|
||||
login_user: "root"
|
||||
login_password: "secrete"
|
||||
login_host: "localhost"
|
||||
login_host: "{{ keystone_galera_address }}"
|
||||
name: "{{ keystone_galera_database }}"
|
||||
password: "{{ keystone_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
|
@ -16,9 +16,16 @@
|
||||
- name: Prepare cinder-volumes volume group
|
||||
hosts: localhost
|
||||
tasks:
|
||||
- name: Install lvm2 package
|
||||
- name: Install lvm2 apt package
|
||||
apt:
|
||||
name: lvm2
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
- name: Install lvm2 yum package
|
||||
yum:
|
||||
name: lvm2
|
||||
when:
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
- name: Create sparse Cinder file
|
||||
shell: "truncate -s 10G /openstack/cinder.img"
|
||||
args:
|
||||
|
35
vars/redhat-7.yml
Normal file
35
vars/redhat-7.yml
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
# Copyright 2016, Rackspace US, 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.
|
||||
|
||||
# service names
|
||||
tgt_service_name: tgtd
|
||||
|
||||
# Common yum packages
|
||||
cinder_distro_packages:
|
||||
- nfs-utils
|
||||
- rpcbind
|
||||
- libxslt-devel
|
||||
- libpqxx-devel
|
||||
- kmod-devel
|
||||
- kmod-libs
|
||||
- zlib-devel
|
||||
|
||||
cinder_volume_distro_packages:
|
||||
- qemu-img
|
||||
|
||||
cinder_lvm_volume_distro_packages:
|
||||
- device-mapper-event
|
||||
- parted
|
||||
- scsi-target-utils
|
@ -16,6 +16,9 @@
|
||||
## APT Cache options
|
||||
cache_timeout: 600
|
||||
|
||||
# service names
|
||||
tgt_service_name: tgt
|
||||
|
||||
# Common apt packages
|
||||
cinder_distro_packages:
|
||||
- libpq-dev
|
||||
|
@ -17,6 +17,9 @@
|
||||
## APT Cache options
|
||||
cache_timeout: 600
|
||||
|
||||
# service names
|
||||
tgt_service_name: tgt
|
||||
|
||||
# Common apt packages
|
||||
cinder_distro_packages:
|
||||
- rpcbind
|
||||
|
Loading…
Reference in New Issue
Block a user