Merge "Implement CentOS 7 support in os_glance"
This commit is contained in:
commit
a7919e9a3f
22
manual-test.rc
Normal file
22
manual-test.rc
Normal file
@ -0,0 +1,22 @@
|
||||
export VIRTUAL_ENV=$(pwd)
|
||||
export ANSIBLE_HOST_KEY_CHECKING=False
|
||||
export ANSIBLE_SSH_CONTROL_PATH=/tmp/%%h-%%r
|
||||
|
||||
# TODO (odyssey4me) These are only here as they are non-standard folder
|
||||
# names for Ansible 1.9.x. We are using the standard folder names for
|
||||
# Ansible v2.x. We can remove this when we move to Ansible 2.x.
|
||||
export ANSIBLE_ACTION_PLUGINS=${HOME}/.ansible/plugins/action
|
||||
export ANSIBLE_CALLBACK_PLUGINS=${HOME}/.ansible/plugins/callback
|
||||
export ANSIBLE_FILTER_PLUGINS=${HOME}/.ansible/plugins/filter
|
||||
export ANSIBLE_LOOKUP_PLUGINS=${HOME}/.ansible/plugins/lookup
|
||||
|
||||
# This is required as the default is the current path or a path specified
|
||||
# in ansible.cfg
|
||||
export ANSIBLE_LIBRARY=${HOME}/.ansible/plugins/library
|
||||
|
||||
# This is required as the default is '/etc/ansible/roles' or a path
|
||||
# specified in ansible.cfg
|
||||
export ANSIBLE_ROLES_PATH=${HOME}/.ansible/roles:$(pwd)/..
|
||||
|
||||
echo "Run manual functional tests by executing the following:"
|
||||
echo "# ./.tox/functional/bin/ansible-playbook -i tests/inventory tests/test.yml -e \"rolename=$(pwd)\""
|
@ -24,6 +24,9 @@ galaxy_info:
|
||||
versions:
|
||||
- trusty
|
||||
- xenial
|
||||
- name: EL
|
||||
versions:
|
||||
- 7
|
||||
categories:
|
||||
- cloud
|
||||
- python
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
upgrade:
|
||||
- The ``glance_apt_packages`` variable has been renamed to
|
||||
``glance_distro_packages`` so that it applies to multiple operating systems.
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- CentOS7/RHEL support has been added to the os_glance
|
||||
role.
|
@ -17,6 +17,10 @@
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
|
||||
- include: glance_install_yum.yml
|
||||
when:
|
||||
- ansible_pkg_mgr == 'yum'
|
||||
|
||||
- name: Create developer mode constraint file
|
||||
copy:
|
||||
dest: "/opt/developer-pip-constraints.txt"
|
||||
|
24
tasks/glance_install_yum.yml
Normal file
24
tasks/glance_install_yum.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
# 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: "{{ glance_package_state }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: "{{ glance_distro_packages }}"
|
@ -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
|
||||
|
@ -39,7 +39,7 @@
|
||||
mysql_db:
|
||||
login_user: "root"
|
||||
login_password: "secrete"
|
||||
login_host: "localhost"
|
||||
login_host: "{{ glance_galera_address }}"
|
||||
name: "{{ glance_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: "{{ glance_galera_address }}"
|
||||
name: "{{ glance_galera_database }}"
|
||||
password: "{{ glance_container_mysql_password }}"
|
||||
host: "{{ item }}"
|
||||
|
@ -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,6 +16,11 @@
|
||||
- name: Perform basic LXC host setup
|
||||
hosts: localhost
|
||||
pre_tasks:
|
||||
- name: Ensure apt cache is always refreshed
|
||||
apt:
|
||||
update_cache: yes
|
||||
when:
|
||||
- ansible_pkg_mgr == 'apt'
|
||||
- name: Ensure root's new public ssh key is in authorized_keys
|
||||
authorized_key:
|
||||
user: root
|
||||
@ -31,7 +36,13 @@
|
||||
set_fact:
|
||||
lxc_container_cache_files:
|
||||
- { src: '/etc/pip.conf', dest: '/etc/pip.conf' }
|
||||
when: nodepool.stat.exists | bool
|
||||
when:
|
||||
- nodepool.stat.exists | bool
|
||||
- name: install the epel repo rpm from a remote repo
|
||||
yum:
|
||||
name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
|
||||
state: "present"
|
||||
when: ansible_pkg_mgr == 'yum'
|
||||
roles:
|
||||
- role: "lxc_hosts"
|
||||
lxc_net_address: 10.100.100.1
|
||||
|
21
vars/redhat-7.yml
Normal file
21
vars/redhat-7.yml
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright 2016, Intel Corporation.
|
||||
#
|
||||
# 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.
|
||||
|
||||
glance_distro_packages:
|
||||
- cronie
|
||||
- cronie-anacron
|
||||
- rpcbind
|
||||
- rsync
|
||||
- git
|
||||
- nfs-utils
|
Loading…
Reference in New Issue
Block a user