
In order to make it easier to differentiate between the lists of python packages, distribution packages, downloaded packages, package pins and other similar variables the variable names are being changed to ensure that they have a more explicit suffix that defines the purpose and makes the naming more consistent. This is to facilitate a lookup plugin which will be able to look up all the package lists and present them as a consolidated piece of data which may be used for artifact preparation. Change-Id: Ia9a7f3c237cc58d00c351a3393e5a723323b6890
131 lines
3.7 KiB
YAML
131 lines
3.7 KiB
YAML
---
|
|
# 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: Create keystone dir
|
|
file:
|
|
path: "{{ item.path }}"
|
|
state: directory
|
|
owner: "{{ item.owner|default(keystone_system_user_name) }}"
|
|
group: "{{ item.group|default(keystone_system_group_name) }}"
|
|
mode: "{{ item.mode|default('0755') }}"
|
|
with_items:
|
|
- { path: "/etc/pki/tls/certs", owner: "root", group: "root" }
|
|
- { path: "/etc/pki/tls/private", owner: "root", group: "root" }
|
|
- { path: "/var/lock/keystone", mode: "2755" }
|
|
- { path: "/var/log/httpd", mode: "2755" }
|
|
|
|
- name: Create system links
|
|
file:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
state: "link"
|
|
with_items:
|
|
- { src: "/etc/pki/tls/certs", dest: "/etc/ssl/certs" }
|
|
- { src: "/etc/pki/tls/private", dest: "/etc/ssl/private" }
|
|
- { src: "/var/log/httpd", dest: "/var/log/apache2" }
|
|
|
|
- name: Install yum packages
|
|
yum:
|
|
pkg: "{{ item }}"
|
|
state: "{{ keystone_package_state }}"
|
|
register: install_packages
|
|
until: install_packages|success
|
|
retries: 5
|
|
delay: 2
|
|
with_items: "{{ keystone_distro_packages }}"
|
|
|
|
- name: Install Apache yum packages
|
|
yum:
|
|
pkg: "{{ item }}"
|
|
state: "{{ keystone_package_state }}"
|
|
register: install_packages
|
|
until: install_packages|success
|
|
retries: 5
|
|
delay: 2
|
|
with_items: "{{ keystone_apache_distro_packages }}"
|
|
when:
|
|
- keystone_apache_mod_wsgi_enabled | bool
|
|
|
|
- name: Install Nginx yum packages
|
|
yum:
|
|
pkg: "{{ item }}"
|
|
state: "{{ keystone_package_state }}"
|
|
register: install_packages
|
|
until: install_packages|success
|
|
retries: 5
|
|
delay: 2
|
|
with_items: "{{ keystone_nginx_distro_packages }}"
|
|
when:
|
|
- not keystone_apache_mod_wsgi_enabled | bool
|
|
|
|
- name: Install IdP yum packages
|
|
yum:
|
|
pkg: "{{ item }}"
|
|
state: "{{ keystone_package_state }}"
|
|
register: install_packages
|
|
until: install_packages|success
|
|
retries: 5
|
|
delay: 2
|
|
with_items: "{{ keystone_idp_distro_packages }}"
|
|
when:
|
|
- keystone_idp is defined
|
|
|
|
#TODO(cloudnull) Remove this task once we move to Ansible 2.1
|
|
# where we can leverage the `yum_repository` module:
|
|
# https://docs.ansible.com/ansible/yum_repository_module.html
|
|
- name: Add shibboleth repo
|
|
copy:
|
|
content: |
|
|
[{{ item.name }}]
|
|
name={{ item.name }}
|
|
description={{ item.description }}
|
|
baseurl={{ item.baseurl }}
|
|
gpgkey={{ item.gpgkey }}
|
|
gpgcheck=1
|
|
enabled=1
|
|
dest: "/etc/yum.repos.d/{{ item.file }}.repo"
|
|
register: add_repos
|
|
until: add_repos|success
|
|
retries: 5
|
|
delay: 2
|
|
with_items:
|
|
- "{{ keystone_shibboleth_repo }}"
|
|
when:
|
|
- keystone_sp is defined
|
|
|
|
- name: Install SP yum packages
|
|
yum:
|
|
pkg: "{{ item }}"
|
|
state: "{{ keystone_package_state }}"
|
|
register: install_packages
|
|
until: install_packages|success
|
|
retries: 5
|
|
delay: 2
|
|
with_items: "{{ keystone_sp_distro_packages }}"
|
|
when:
|
|
- keystone_sp is defined
|
|
|
|
- name: Install developer mode yum packages
|
|
yum:
|
|
pkg: "{{ item }}"
|
|
state: "{{ keystone_package_state }}"
|
|
register: install_packages
|
|
until: install_packages|success
|
|
retries: 5
|
|
delay: 2
|
|
with_items: "{{ keystone_developer_distro_packages }}"
|
|
when:
|
|
- keystone_developer_mode | bool
|