Merge "Allow to manage extra services, mounts and networks"
This commit is contained in:
commit
854397b5d0
|
@ -192,4 +192,14 @@ openstack_hosts_package_manager_extra_conf: ''
|
|||
openstack_hosts_apt_pinned_packages:
|
||||
- package: "src:ceph"
|
||||
origin: "ubuntu-cloud.archive.canonical.com"
|
||||
priority: 400
|
||||
priority: 400
|
||||
|
||||
# Define extra systemd services/networks/mounts
|
||||
openstack_hosts_systemd_mounts: []
|
||||
# Systemd networks can be configured only on bare metal hosts
|
||||
# systemd-networkd role won't run inside containers.
|
||||
openstack_hosts_systemd_networkd_devices: []
|
||||
openstack_hosts_systemd_networkd_networks: []
|
||||
openstack_hosts_systemd_networkd_prefix: openstack-net
|
||||
openstack_hosts_systemd_services: []
|
||||
openstack_hosts_systemd_slice: "openstack-hosts"
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
prelude: >
|
||||
It is now possible to create and manage third-party services,
|
||||
mount points and networks on hosts managed by OpenStack-Ansible.
|
||||
This also inlcudes networks, that are required for OpenStack-Ansible
|
||||
installation, like br-mgmt or br-storage.
|
||||
In order to configure specific resources on selected set of hosts,
|
||||
usage of group_vars or host_vars is appreciated.
|
||||
features:
|
||||
- |
|
||||
Added new varaibles that allow users to configure extra systemd
|
||||
services, networks or mounts on openstack hosts. While services and
|
||||
mounts can be configured on any targeted hosts, networks will be created
|
||||
only on bare metal nodes. In order to configure extra networks in
|
||||
containers please reffer to ``openstack_user_config.yml`` documentation.
|
||||
A list of new variables that were added:
|
||||
|
||||
* openstack_hosts_systemd_mounts
|
||||
* openstack_hosts_systemd_networkd_devices
|
||||
* openstack_hosts_systemd_networkd_networks
|
||||
* openstack_hosts_systemd_networkd_prefix
|
||||
* openstack_hosts_systemd_services
|
||||
* openstack_hosts_systemd_slice
|
|
@ -163,3 +163,13 @@
|
|||
tags:
|
||||
- openstack_hosts-config
|
||||
when: ansible_facts['hostname'] != 'aio1'
|
||||
|
||||
- include_tasks: openstack_hosts_systemd.yml
|
||||
args:
|
||||
apply:
|
||||
tags:
|
||||
- openstack_hosts-config
|
||||
- openstack_hosts-systemd
|
||||
when: openstack_hosts_systemd_networkd_devices or openstack_hosts_systemd_networkd_networks or openstack_hosts_systemd_services or openstack_hosts_systemd_mounts
|
||||
tags:
|
||||
- always
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
# Copyright 2022, Cleura AB.
|
||||
#
|
||||
# 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: Run the systemd-networkd role
|
||||
include_role:
|
||||
name: systemd_networkd
|
||||
vars:
|
||||
systemd_networkd_prefix: "{{ openstack_hosts_systemd_networkd_prefix }}"
|
||||
systemd_run_networkd: true
|
||||
systemd_netdevs: "{{ openstack_hosts_systemd_networkd_devices }}"
|
||||
systemd_networks: "{{ openstack_hosts_systemd_networkd_networks }}"
|
||||
when:
|
||||
- openstack_hosts_systemd_networkd_devices
|
||||
- openstack_hosts_systemd_networkd_networks
|
||||
- is_metal
|
||||
|
||||
- name: Run the systemd-service role
|
||||
include_role:
|
||||
name: systemd_service
|
||||
vars:
|
||||
systemd_slice_name: "{{ openstack_hosts_systemd_slice }}"
|
||||
systemd_services: "{{ openstack_hosts_systemd_services }}"
|
||||
when:
|
||||
- openstack_hosts_systemd_services
|
||||
|
||||
- name: Run the systemd mount role
|
||||
include_role:
|
||||
name: systemd_mount
|
||||
vars:
|
||||
systemd_mounts: "{{ openstack_hosts_systemd_mounts }}"
|
||||
when:
|
||||
- openstack_hosts_systemd_mounts
|
Loading…
Reference in New Issue