forked from openstack-k8s-operators/edpm-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[edpm_update] Added
edpm_update
role and update
playbook
The `edpm_update` role is added to allow the update of packages and containers on EDPM nodes. A file called `update.yml` has been added into all impacted roles. Jira: https://issues.redhat.com/browse/OSPRH-6219 Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
- Loading branch information
Showing
10 changed files
with
263 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
|
||
- name: EDPM Update | ||
hosts: "{{ edpm_override_hosts | default('all', true) }}" | ||
strategy: linear | ||
any_errors_fatal: "{{ edpm_any_errors_fatal | default(true) }}" | ||
max_fail_percentage: "{{ edpm_max_fail_percentage | default(0) }}" | ||
tasks: | ||
- name: Import edpm_update | ||
ansible.builtin.import_role: | ||
name: osp.edpm.edpm_update | ||
tags: | ||
- edpm_update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
argument_specs: | ||
# ./roles/edpm_update/tasks/main.yml entry point | ||
main: | ||
short_description: The main entry point for the edpm_update role. | ||
description: Multiple lines description | ||
options: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
# Copyright 2023 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: EDPM OpenStack Role -- edpm_update | ||
company: Red Hat | ||
license: Apache-2.0 | ||
min_ansible_version: '2.14' | ||
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: 'EL' | ||
versions: | ||
- '8' | ||
- '9' | ||
|
||
galaxy_tags: | ||
- edpm | ||
|
||
|
||
# List your role dependencies here, one per line. Be sure to remove the '[]' above, | ||
# if you add dependencies to this list. | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
# Copyright 2023 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 | ||
tasks: | ||
- name: "Dummy task, need to be implemented." | ||
ansible.builtin.debug: | ||
msg: "This is a dummy task, this molecule test need to be implemented." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
# Copyright 2023 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 | ||
tasks: | ||
- name: Dummy tasks | ||
ansible.builtin.debug: | ||
msg: "Dummy preparation task" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
|
||
- name: Login to container registries if needed | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_podman | ||
tasks_from: login.yml | ||
tags: | ||
- edpm_podman | ||
- edpm_update | ||
|
||
- name: Download images for edpm_iscsid role | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_iscsid | ||
tasks_from: run.yml | ||
tags: | ||
- edpm_iscsid | ||
- edpm_update | ||
|
||
- name: Download images for edpm_ovn role | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_ovn | ||
tasks_from: run.yml | ||
tags: | ||
- edpm_ovn | ||
- edpm_update | ||
|
||
- name: Download images for edpm_frr role | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_frr | ||
tasks_from: run.yml | ||
tags: | ||
- edpm_frr | ||
- edpm_update | ||
|
||
- name: Download images for edpm_ovn_bgp_agent role | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_ovn_bgp_agent | ||
tasks_from: run.yml | ||
tags: | ||
- edpm_ovn_bgp_agent | ||
- edpm_update | ||
|
||
- name: Download images for edpm_neutron_metadata role | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_neutron_metadata | ||
tasks_from: run.yml | ||
tags: | ||
- edpm_neutron_metadata | ||
- edpm_update | ||
|
||
- name: Download images for edpm_neutron_ovn role | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_neutron_ovn | ||
tasks_from: run.yml | ||
tags: | ||
- edpm_neutron_ovn | ||
- edpm_update | ||
|
||
- name: Download images for edpm_multipathd role | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_multipathd | ||
tasks_from: run.yml | ||
tags: | ||
- edpm_multipathd | ||
- edpm_update | ||
|
||
- name: Download images for edpm_nova role | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_nova | ||
tasks_from: run.yml | ||
tags: | ||
- edpm_nova | ||
- edpm_update | ||
|
||
- name: Download images for edpm_neutron_sriov role | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_neutron_sriov | ||
tasks_from: run.yml | ||
tags: | ||
- edpm_neutron_sriov | ||
- edpm_update | ||
|
||
- name: Download images for edpm_neutron_dhcp role | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_neutron_dhcp | ||
tasks_from: run.yml | ||
|
||
- name: Download images for edpm_logrotate_crond role | ||
ansible.builtin.include_role: | ||
name: osp.edpm.edpm_logrotate_crond | ||
tasks_from: edpm_update_images.yml | ||
tags: | ||
- edpm_logrotate_crond | ||
- edpm_update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
# Copyright 2023 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. | ||
|
||
|
||
# "edpm_update" will search for and load any operating system variable file | ||
|
||
- name: Update packages | ||
ansible.builtin.include_tasks: packages.yml | ||
|
||
- name: Update containers | ||
ansible.builtin.include_tasks: containers.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
|
||
- name: Apply updates | ||
ansible.builtin.dnf: # noqa: package-latest | ||
name: "*" | ||
state: latest | ||
update_cache: true | ||
tags: | ||
- edpm_update |