Merge "Add CentOS7 support for Swift"
This commit is contained in:
commit
1ff581f6b9
@ -37,10 +37,12 @@
|
|||||||
service:
|
service:
|
||||||
name: "rsyslog"
|
name: "rsyslog"
|
||||||
state: "restarted"
|
state: "restarted"
|
||||||
|
enabled: "yes"
|
||||||
|
sleep: 2
|
||||||
|
|
||||||
- name: Restart rsync service
|
- name: Restart rsync service
|
||||||
service:
|
service:
|
||||||
name: "rsync"
|
name: "{{ swift_rsync_service_name }}"
|
||||||
state: "restarted"
|
state: "restarted"
|
||||||
enabled: "yes"
|
enabled: "yes"
|
||||||
sleep: 2
|
sleep: 2
|
||||||
|
@ -31,6 +31,7 @@ galaxy_info:
|
|||||||
- openstack
|
- openstack
|
||||||
dependencies:
|
dependencies:
|
||||||
- pip_install
|
- pip_install
|
||||||
|
- rsyslog_client
|
||||||
- role: apt_package_pinning
|
- role: apt_package_pinning
|
||||||
when:
|
when:
|
||||||
- ansible_pkg_mgr == 'apt'
|
- ansible_pkg_mgr == 'apt'
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- CentOS7/RHEL support has been added to the os_swift role.
|
33
tasks/install-yum.yml
Normal file
33
tasks/install-yum.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
# Copyright 2014, 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 RDO package
|
||||||
|
yum:
|
||||||
|
pkg: "{{ rdo_package }}"
|
||||||
|
state: "present"
|
||||||
|
register: install_cloud_rdo_package
|
||||||
|
until: install_cloud_rdo_package | success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
|
|
||||||
|
- name: Install yum packages
|
||||||
|
yum:
|
||||||
|
pkg: "{{ item }}"
|
||||||
|
state: "{{ swift_package_state }}"
|
||||||
|
register: install_packages
|
||||||
|
until: install_packages|success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
|
with_items: "{{ swift_distro_packages }}"
|
@ -41,6 +41,14 @@
|
|||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
- name: Gather facts for storage_bridge
|
||||||
|
setup:
|
||||||
|
filter: "{{ swift_storage_bridge }}"
|
||||||
|
when:
|
||||||
|
- swift_storage_bridge is defined
|
||||||
|
- hostvars[inventory_hostname][swift_storage_bridge] is defined
|
||||||
|
- swift_storage_address is not defined
|
||||||
|
|
||||||
- name: Swift storage address not found
|
- name: Swift storage address not found
|
||||||
fail:
|
fail:
|
||||||
msg: "{{ swift.storage_network }} not found on host, can't find storage address."
|
msg: "{{ swift.storage_network }} not found on host, can't find storage address."
|
||||||
@ -96,6 +104,14 @@
|
|||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
- name: Gather facts for storage_bridge
|
||||||
|
setup:
|
||||||
|
filter: "{{ swift_replication_bridge }}"
|
||||||
|
when:
|
||||||
|
- swift_replication_bridge is defined
|
||||||
|
- hostvars[inventory_hostname][swift_replication_bridge] is defined
|
||||||
|
- swift_replication_address is not defined
|
||||||
|
|
||||||
- name: Swift replication address not found
|
- name: Swift replication address not found
|
||||||
fail:
|
fail:
|
||||||
msg: "{{ swift.replication_network }} not found on host, can't find swift_replican_address"
|
msg: "{{ swift.replication_network }} not found on host, can't find swift_replican_address"
|
||||||
|
@ -17,6 +17,10 @@
|
|||||||
static: no
|
static: no
|
||||||
when: ansible_pkg_mgr == 'apt'
|
when: ansible_pkg_mgr == 'apt'
|
||||||
|
|
||||||
|
- include: install-yum.yml
|
||||||
|
static: no
|
||||||
|
when: ansible_pkg_mgr == 'yum'
|
||||||
|
|
||||||
- name: Create developer mode constraint file
|
- name: Create developer mode constraint file
|
||||||
copy:
|
copy:
|
||||||
dest: "/opt/developer-pip-constraints.txt"
|
dest: "/opt/developer-pip-constraints.txt"
|
||||||
|
@ -43,11 +43,13 @@
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
notify: "Restart rsync service"
|
notify: "Restart rsync service"
|
||||||
|
|
||||||
- name: "Enable rsync in defaults"
|
# Red Hat/CentOS are enabled as part of the handler
|
||||||
|
- name: "Enable rsync service in defaults (Debian)"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: "/etc/default/rsync"
|
dest: "/etc/default/rsync"
|
||||||
line: "RSYNC_ENABLE=true"
|
line: "RSYNC_ENABLE=true"
|
||||||
regexp: "^RSYNC_ENABLE*"
|
regexp: "^RSYNC_ENABLE*"
|
||||||
|
when: ansible_pkg_mgr =="apt"
|
||||||
notify: "Restart rsync service"
|
notify: "Restart rsync service"
|
||||||
|
|
||||||
- name: "Setup swift-recon-cron cron job"
|
- name: "Setup swift-recon-cron cron job"
|
||||||
|
@ -42,3 +42,7 @@
|
|||||||
src: https://git.openstack.org/openstack/openstack-ansible-os_keystone
|
src: https://git.openstack.org/openstack/openstack-ansible-os_keystone
|
||||||
scm: git
|
scm: git
|
||||||
version: master
|
version: master
|
||||||
|
- name: rsyslog_client
|
||||||
|
src: https://git.openstack.org/openstack/openstack-ansible-rsyslog_client
|
||||||
|
scm: git
|
||||||
|
version: master
|
||||||
|
@ -26,3 +26,7 @@ swift_distro_packages:
|
|||||||
- python-dev
|
- python-dev
|
||||||
- rsync
|
- rsync
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
|
|
||||||
|
swift_syslog_user_name: syslog
|
||||||
|
swift_syslog_group_name: syslog
|
||||||
|
swift_rsync_service_name: rsync
|
||||||
|
33
vars/redhat-7.yml
Normal file
33
vars/redhat-7.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
swift_distro_packages:
|
||||||
|
- curl
|
||||||
|
- gcc
|
||||||
|
- git
|
||||||
|
- liberasurecode
|
||||||
|
- liberasurecode-devel
|
||||||
|
- libffi-devel
|
||||||
|
- openssh-server
|
||||||
|
- python-devel
|
||||||
|
- rsync
|
||||||
|
- openssl-devel
|
||||||
|
- cronie
|
||||||
|
- cronie-anacron
|
||||||
|
|
||||||
|
swift_syslog_user_name: root
|
||||||
|
swift_syslog_group_name: root
|
||||||
|
swift_rsync_service_name: rsyncd
|
||||||
|
rdo_package: "https://rdoproject.org/repos/rdo-release.rpm"
|
Loading…
x
Reference in New Issue
Block a user