
Since ansible-core 2.10 it is recommended to use modules via FQCN In order to align with recommendation, we perform migration by applying suggestions made by `ansible-lint --fix=fqcn` Change-Id: Ibf7bac98d8ca25801a2abd0f4b195d6a248e6589
68 lines
2.2 KiB
YAML
68 lines
2.2 KiB
YAML
---
|
|
# 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
|
|
ansible.builtin.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
|
|
ansible.builtin.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
|
|
ansible.builtin.include_role:
|
|
name: systemd_mount
|
|
vars:
|
|
systemd_mounts: "{{ openstack_hosts_systemd_mounts }}"
|
|
when:
|
|
- openstack_hosts_systemd_mounts
|
|
|
|
- name: Configure systemd-journald
|
|
when: openstack_hosts_journald_config
|
|
block:
|
|
- name: Create /etc/systemd/journald.conf.d directory
|
|
ansible.builtin.file:
|
|
path: /etc/systemd/journald.conf.d
|
|
state: directory
|
|
owner: root
|
|
group: systemd-journal
|
|
mode: "0755"
|
|
|
|
- name: Define journald configuration
|
|
ansible.builtin.copy:
|
|
content: |-
|
|
[Journal]
|
|
{% for key, value in openstack_hosts_journald_config.items() %}
|
|
{{ key }}={{ value }}
|
|
{% endfor %}
|
|
dest: /etc/systemd/journald.conf.d/99-osa-journal.conf
|
|
mode: "0644"
|
|
notify:
|
|
- Restart systemd-journald
|