Add tags for kolla, kolla-openstack and kolla-bifrost roles

This commit is contained in:
Mark Goddard 2017-03-15 09:39:14 +00:00
parent 3067a28b3e
commit 473d47310e
6 changed files with 111 additions and 94 deletions

View File

@ -1,3 +1,8 @@
---
- include: install.yml
tags:
- install
- include: config.yml
tags:
- config

View File

@ -0,0 +1,35 @@
---
- name: Ensure the Kolla OpenStack configuration directores exist
file:
path: "{{ kolla_node_custom_config_path }}/{{ item.name }}"
state: directory
mode: 0755
become: True
with_items:
- { name: ironic, enabled: "{{ kolla_enable_ironic }}" }
- { name: swift, enabled: "{{ kolla_enable_swift }}" }
when: "{{ item.enabled | bool }}"
- name: Ensure the Kolla OpenStack configuration files exist
template:
src: "{{ item.src }}"
dest: "{{ kolla_node_custom_config_path }}/{{ item.dest }}"
mode: 0644
become: True
with_items:
- { src: glance.conf.j2, dest: glance.conf, enabled: "{{ kolla_enable_glance }}" }
- { src: ironic.conf.j2, dest: ironic.conf, enabled: "{{ kolla_enable_ironic }}" }
- { src: ironic-dnsmasq.conf.j2, dest: ironic/ironic-dnsmasq.conf, enabled: "{{ kolla_enable_ironic }}" }
- { src: ironic-inspector.conf.j2, dest: ironic-inspector.conf, enabled: "{{ kolla_enable_ironic }}" }
- { src: pxelinux.default.j2, dest: ironic/pxelinux.default, enabled: "{{ kolla_enable_ironic }}" }
when: "{{ item.enabled | bool }}"
- name: Ensure the ironic inspector kernel and ramdisk exist
get_url:
url: "{{ item.url }}"
dest: "{{ kolla_node_custom_config_path }}/ironic/{{ item.dest }}"
become: True
with_items:
- { url: "{{ kolla_inspector_ipa_kernel_upstream_url }}", dest: "ironic-agent.kernel" }
- { url: "{{ kolla_inspector_ipa_ramdisk_upstream_url }}", dest: "ironic-agent.initramfs" }
when: "{{ kolla_enable_ironic | bool }}"

View File

@ -1,35 +1,4 @@
---
- name: Ensure the Kolla OpenStack configuration directores exist
file:
path: "{{ kolla_node_custom_config_path }}/{{ item.name }}"
state: directory
mode: 0755
become: True
with_items:
- { name: ironic, enabled: "{{ kolla_enable_ironic }}" }
- { name: swift, enabled: "{{ kolla_enable_swift }}" }
when: "{{ item.enabled | bool }}"
- name: Ensure the Kolla OpenStack configuration files exist
template:
src: "{{ item.src }}"
dest: "{{ kolla_node_custom_config_path }}/{{ item.dest }}"
mode: 0644
become: True
with_items:
- { src: glance.conf.j2, dest: glance.conf, enabled: "{{ kolla_enable_glance }}" }
- { src: ironic.conf.j2, dest: ironic.conf, enabled: "{{ kolla_enable_ironic }}" }
- { src: ironic-dnsmasq.conf.j2, dest: ironic/ironic-dnsmasq.conf, enabled: "{{ kolla_enable_ironic }}" }
- { src: ironic-inspector.conf.j2, dest: ironic-inspector.conf, enabled: "{{ kolla_enable_ironic }}" }
- { src: pxelinux.default.j2, dest: ironic/pxelinux.default, enabled: "{{ kolla_enable_ironic }}" }
when: "{{ item.enabled | bool }}"
- name: Ensure the ironic inspector kernel and ramdisk exist
get_url:
url: "{{ item.url }}"
dest: "{{ kolla_node_custom_config_path }}/ironic/{{ item.dest }}"
become: True
with_items:
- { url: "{{ kolla_inspector_ipa_kernel_upstream_url }}", dest: "ironic-agent.kernel" }
- { url: "{{ kolla_inspector_ipa_ramdisk_upstream_url }}", dest: "ironic-agent.initramfs" }
when: "{{ kolla_enable_ironic | bool }}"
- include: config.yml
tags:
- config

View File

@ -0,0 +1,9 @@
---
- name: Ensure the Kolla configuration directores exist
file:
path: "{{ item }}"
state: directory
mode: 0755
become: True
with_items:
- "{{ kolla_config_path }}"

View File

@ -0,0 +1,53 @@
---
- name: Ensure required packages are installed
yum:
name: "{{ item }}"
state: installed
become: True
with_items:
- gcc
- libffi-devel
- openssl-devel
- python-devel
- python-pip
- python-virtualenv
- name: Ensure the latest version of pip is installed
pip:
name: "{{ item.name }}"
state: latest
virtualenv: "{{ kolla_venv }}"
with_items:
- { name: pip }
- name: Ensure source code checkout path exists
file:
path: "{{ source_checkout_path }}"
state: directory
recurse: True
- name: Ensure Kolla source code checkout exists
git:
repo: "{{ kolla_source_url }}"
dest: "{{ source_checkout_path }}/kolla"
version: "{{ kolla_source_version }}"
when: "{{ kolla_ctl_install_type == 'source' }}"
- name: Ensure required Python packages are installed
pip:
name: "{{ item.name }}"
version: "{{ item.version | default(omit) }}"
state: present
virtualenv: "{{ kolla_venv }}"
with_items:
# Intall Kolla from source.
- name: "{{ source_checkout_path }}/kolla"
install: "{{ kolla_ctl_install_type == 'source' }}"
# Intall Kolla from PyPI.
- name: "kolla"
version: "{{ kolla_openstack_release }}"
install: "{{ kolla_ctl_install_type == 'binary' }}"
# Required for kolla-genpwd.
- name: PyYAML
version: "3.12"
when: "{{ item.install | default(True) | bool }}"

View File

@ -1,62 +1,8 @@
---
- name: Ensure required packages are installed
yum:
name: "{{ item }}"
state: installed
become: True
with_items:
- gcc
- libffi-devel
- openssl-devel
- python-devel
- python-pip
- python-virtualenv
- include: install.yml
tags:
- install
- name: Ensure the latest version of pip is installed
pip:
name: "{{ item.name }}"
state: latest
virtualenv: "{{ kolla_venv }}"
with_items:
- { name: pip }
- name: Ensure source code checkout path exists
file:
path: "{{ source_checkout_path }}"
state: directory
recurse: True
- name: Ensure Kolla source code checkout exists
git:
repo: "{{ kolla_source_url }}"
dest: "{{ source_checkout_path }}/kolla"
version: "{{ kolla_source_version }}"
when: "{{ kolla_ctl_install_type == 'source' }}"
- name: Ensure required Python packages are installed
pip:
name: "{{ item.name }}"
version: "{{ item.version | default(omit) }}"
state: present
virtualenv: "{{ kolla_venv }}"
with_items:
# Intall Kolla from source.
- name: "{{ source_checkout_path }}/kolla"
install: "{{ kolla_ctl_install_type == 'source' }}"
# Intall Kolla from PyPI.
- name: "kolla"
version: "{{ kolla_openstack_release }}"
install: "{{ kolla_ctl_install_type == 'binary' }}"
# Required for kolla-genpwd.
- name: PyYAML
version: "3.12"
when: "{{ item.install | default(True) | bool }}"
- name: Ensure the Kolla configuration directores exist
file:
path: "{{ item }}"
state: directory
mode: 0755
become: True
with_items:
- "{{ kolla_config_path }}"
- include: config.yml
tags:
- config