Merge "New tripleo_ironic role"

This commit is contained in:
Zuul 2022-09-14 17:26:57 +00:00 committed by Gerrit Code Review
commit b54eeec0bf
11 changed files with 220 additions and 1 deletions

View File

@ -0,0 +1,6 @@
=========================
Role - tripleo_ironic_api
=========================
.. ansibleautoplugin::
:role: tripleo_ansible/roles/tripleo_ironic

View File

@ -37,6 +37,10 @@ tripleo_httpd_vhost_document_root: '/var/www/cgi-bin'
tripleo_httpd_vhost_error_log_file: "/var/log/httpd/{{ tripleo_httpd_vhost_access_log_name }}_error.log"
tripleo_httpd_vhost_group: 'apache'
tripleo_httpd_vhost_headers: []
tripleo_httpd_vhost_options:
- '-Indexes'
- '+FollowSymLinks'
- '+MultiViews'
tripleo_httpd_vhost_path: '/'
tripleo_httpd_vhost_priority: 10
tripleo_httpd_vhost_proxy: false

View File

@ -6,7 +6,7 @@
DocumentRoot "{{ tripleo_httpd_vhost_document_root }}"
<Directory "{{ tripleo_httpd_vhost_document_root }}">
Options -Indexes +FollowSymLinks +MultiViews
Options {{ tripleo_httpd_vhost_options | join(' ') }}
AllowOverride None
Require all granted
</Directory>

View File

@ -0,0 +1,26 @@
---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# 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.
# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "tripleo_ironic_"
tripleo_ironic_api_httpd_config_httpd_conf: null
tripleo_ironic_api_httpd_config_prefork_serverlimit: null
tripleo_ironic_api_httpd_config_prefork_maxrequestworkers: null
tripleo_ironic_api_httpd_config_mods: null
tripleo_ironic_api_httpd_vhost_ssl_ca: null

View File

@ -0,0 +1,43 @@
---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# 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.
galaxy_info:
author: OpenStack
description: TripleO OpenStack Role -- tripleo_ironic
company: Red Hat
license: Apache-2.0
min_ansible_version: 2.7
namespace: openstack
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
platforms:
- name: CentOS
versions:
- 8
- 9
galaxy_tags:
- tripleo
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
dependencies: []

View File

@ -0,0 +1,21 @@
---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# 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: Converge
hosts: all
roles:
- role: "tripleo_ironic"

View File

@ -0,0 +1,28 @@
---
driver:
name: podman
provisioner:
inventory:
hosts:
all:
hosts:
centos:
ansible_python_interpreter: /usr/bin/python3
name: ansible
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
scenario:
test_sequence:
- destroy
- create
- prepare
- converge
- check
- verify
- destroy
verifier:
name: testinfra

View File

@ -0,0 +1,22 @@
---
# Copyright 2022 Red Hat, Inc.
# All Rights Reserved.
#
# 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: Prepare
hosts: all
roles:
- role: test_deps
- role: env_data

View File

@ -0,0 +1,42 @@
---
- name: Ensure needed params are set
fail:
msg: "{{ item.k }} must be set to an actual value"
when: item.v == None
loop:
- k: "tripleo_ironic_api_httpd_config_httpd_conf"
v: "{{ tripleo_ironic_api_httpd_config_httpd_conf }}"
- k: "tripleo_ironic_api_httpd_config_prefork_serverlimit"
v: "{{ tripleo_ironic_api_httpd_config_prefork_serverlimit }}"
- k: "tripleo_ironic_api_httpd_config_prefork_maxrequestworkers"
v: "{{ tripleo_ironic_api_httpd_config_prefork_maxrequestworkers }}"
- k: "tripleo_ironic_api_httpd_config_mods"
v: "{{ tripleo_ironic_api_httpd_config_mods }}"
- name: Create httpd config and vhost
vars:
tripleo_httpd_config_httpd_conf: "{{ tripleo_ironic_api_httpd_config_httpd_conf }}"
tripleo_httpd_config_prefork_serverlimit: "{{ tripleo_ironic_api_httpd_config_prefork_serverlimit }}"
tripleo_httpd_config_prefork_maxrequestworkers: "{{ tripleo_ironic_api_httpd_config_prefork_maxrequestworkers }}"
tripleo_httpd_config_mods: "{{ tripleo_ironic_api_httpd_config_mods }}"
tripleo_httpd_vhost_ssl_ca: "{{ tripleo_ironic_api_httpd_vhost_ssl_ca }}"
# Fixed params
tripleo_httpd_vhost_user: 'ironic'
tripleo_httpd_vhost_service_name: 'ironic_api'
tripleo_httpd_vhost_group: "{{ tripleo_httpd_vhost_user }}"
tripleo_httpd_vhost_access_log_format: 'forwarded'
tripleo_httpd_vhost_access_log_name: 'ironic_wsgi'
tripleo_httpd_vhost_document_root: '/var/www/cgi-bin/ironic'
tripleo_httpd_vhost_wsgi_process_group: "{{ tripleo_httpd_vhost_user }}"
tripleo_httpd_vhost_wsgi_daemon_process:
ironic:
'display-name': 'ironic_wsgi'
group: "{{ tripleo_httpd_vhost_user }}"
processes: 6
threads: 15
user: "{{ tripleo_httpd_vhost_user }}"
tripleo_httpd_vhost_wsgi: true
tripleo_httpd_vhost_wsgi_script_alias:
'/': '/var/www/cgi-bin/ironic/app'
import_role:
name: tripleo_httpd_vhost

View File

@ -0,0 +1,17 @@
---
- name: Create httpd config and vhost
vars:
tripleo_httpd_vhost_user: 'ironic'
tripleo_httpd_vhost_service_name: 'ironic'
tripleo_httpd_vhost_servername: 'ipxe_vhost'
tripleo_httpd_vhost_group: "{{ tripleo_httpd_vhost_user }}"
tripleo_httpd_vhost_access_log_name: "{{ tripleo_httpd_vhost_servername }}"
tripleo_httpd_vhost_document_root: '/var/lib/ironic/httpboot'
tripleo_httpd_vhost_bind_port: 8088
tripleo_httpd_vhost_options:
- 'Indexes'
- 'FollowSymLinks'
tripleo_httpd_vhost_wsgi: false
tripleo_httpd_vhost_ssl: false
import_role:
name: tripleo_httpd_vhost

View File

@ -38,6 +38,7 @@
- tripleo-ansible-centos-stream-molecule-tripleo_httpd_config
- tripleo-ansible-centos-stream-molecule-tripleo_httpd_vhost
- tripleo-ansible-centos-stream-molecule-tripleo_image_serve
- tripleo-ansible-centos-stream-molecule-tripleo_ironic
- tripleo-ansible-centos-stream-molecule-tripleo_iscsid
- tripleo-ansible-centos-stream-molecule-tripleo_kernel
- tripleo-ansible-centos-stream-molecule-tripleo_keystone
@ -111,6 +112,7 @@
- tripleo-ansible-centos-stream-molecule-tripleo_httpd_config
- tripleo-ansible-centos-stream-molecule-tripleo_httpd_vhost
- tripleo-ansible-centos-stream-molecule-tripleo_image_serve
- tripleo-ansible-centos-stream-molecule-tripleo_ironic
- tripleo-ansible-centos-stream-molecule-tripleo_iscsid
- tripleo-ansible-centos-stream-molecule-tripleo_kernel
- tripleo-ansible-centos-stream-molecule-tripleo_keystone
@ -183,6 +185,7 @@
- tripleo-ansible-centos-stream-molecule-tripleo_httpd_config
- tripleo-ansible-centos-stream-molecule-tripleo_httpd_vhost
- tripleo-ansible-centos-stream-molecule-tripleo_image_serve
- tripleo-ansible-centos-stream-molecule-tripleo_ironic
- tripleo-ansible-centos-stream-molecule-tripleo_iscsid
- tripleo-ansible-centos-stream-molecule-tripleo_kernel
- tripleo-ansible-centos-stream-molecule-tripleo_keystone
@ -483,6 +486,13 @@
parent: tripleo-ansible-centos-stream-base
vars:
tripleo_role_name: tripleo_image_serve
- job:
files:
- ^tripleo_ansible/roles/tripleo_ironic/(?!meta).*
name: tripleo-ansible-centos-stream-molecule-tripleo_ironic
parent: tripleo-ansible-centos-stream-base
vars:
tripleo_role_name: tripleo_ironic
- job:
files:
- ^tripleo_ansible/roles/tripleo_iscsid/(?!meta).*