import rhel-system-roles-1.0-20.el8
This commit is contained in:
parent
fe1303163e
commit
287e02c51d
11
.gitignore
vendored
11
.gitignore
vendored
@ -1,6 +1,13 @@
|
||||
SOURCES/certificate-fedef6e.tar.gz
|
||||
SOURCES/kdump-0c2bb28.tar.gz
|
||||
SOURCES/network-d5891d4.tar.gz
|
||||
SOURCES/kernel_settings-901a73a.tar.gz
|
||||
SOURCES/logging-fe3f658.tar.gz
|
||||
SOURCES/metrics-7f94b49.tar.gz
|
||||
SOURCES/nbde_client-6306def.tar.gz
|
||||
SOURCES/nbde_server-4b6cfca.tar.gz
|
||||
SOURCES/network-bf4501b.tar.gz
|
||||
SOURCES/postfix-0.1.tar.gz
|
||||
SOURCES/selinux-6cd1ec8.tar.gz
|
||||
SOURCES/storage-1594e25.tar.gz
|
||||
SOURCES/storage-81f30ab.tar.gz
|
||||
SOURCES/timesync-924650d.tar.gz
|
||||
SOURCES/tlog-cfa70b6.tar.gz
|
||||
|
@ -1,6 +1,13 @@
|
||||
5aa98ec9e109c5ebfae327718e5cad1d3c837e4f SOURCES/certificate-fedef6e.tar.gz
|
||||
36b200d1c6a8d1cb1ea87e3e9aa8c4f6bbd8155d SOURCES/kdump-0c2bb28.tar.gz
|
||||
530aaa9302d90c278b9e1c8d8513e516494e3380 SOURCES/network-d5891d4.tar.gz
|
||||
263a6bbe7b25fbbc13c60b6b30861b63ec2648cd SOURCES/kernel_settings-901a73a.tar.gz
|
||||
9f365ee569d0d6e542983842ffd7c81c82e2c3ca SOURCES/logging-fe3f658.tar.gz
|
||||
3c25f49356e9325ba694d14ece036c8ea3aa16f6 SOURCES/metrics-7f94b49.tar.gz
|
||||
435fed277e03b6c409ebbfa421c15f97ba15e8c8 SOURCES/nbde_client-6306def.tar.gz
|
||||
e936390ddc7440e25190d6ff98cf5e5b3bf1fc3b SOURCES/nbde_server-4b6cfca.tar.gz
|
||||
d1e3e5cd724e7a61a9b3f4eb2bf669d6ed6f9cde SOURCES/network-bf4501b.tar.gz
|
||||
66c82331f4ac9598c506c3999965b4d07dbfe49d SOURCES/postfix-0.1.tar.gz
|
||||
246383bd6823533ed3a51a0501b75e38ba852908 SOURCES/selinux-6cd1ec8.tar.gz
|
||||
aa1c37b04cef831148d9834033fe414156ba62df SOURCES/storage-1594e25.tar.gz
|
||||
d1ba125b693ac5b8705e79d92b13f24c01c51a86 SOURCES/storage-81f30ab.tar.gz
|
||||
ffd2a706e4e3007684aa9874c8457ad5c8920050 SOURCES/timesync-924650d.tar.gz
|
||||
66538d3279cb5972f73a70960a4407d2abe56883 SOURCES/tlog-cfa70b6.tar.gz
|
||||
|
13
SOURCES/kdump-meta-el8.diff
Normal file
13
SOURCES/kdump-meta-el8.diff
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/meta/main.yml b/meta/main.yml
|
||||
index 2478fa6..ad8f4c6 100644
|
||||
--- a/meta/main.yml
|
||||
+++ b/meta/main.yml
|
||||
@@ -7,6 +7,6 @@ galaxy_info:
|
||||
min_ansible_version: 2.4
|
||||
platforms:
|
||||
- name: Fedora
|
||||
- versions: [ 27, 28 ]
|
||||
+ versions: [ 31, 32 ]
|
||||
- name: EL
|
||||
- versions: [ 6, 7 ]
|
||||
+ versions: [ 6, 7, 8 ]
|
@ -45,30 +45,25 @@ index 0000000..2035dfc
|
||||
+ with_items: "{{ restore_services }}"
|
||||
+ tags: tests::cleanup
|
||||
diff --git a/tests/tests_default.yml b/tests/tests_default.yml
|
||||
index 4c93830..60d7967 100644
|
||||
index 4c93830..9e7743a 100644
|
||||
--- a/tests/tests_default.yml
|
||||
+++ b/tests/tests_default.yml
|
||||
@@ -1,6 +1,18 @@
|
||||
|
||||
- name: Ensure that the rule runs with default parameters
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
hosts: all
|
||||
@@ -4,3 +4,13 @@
|
||||
|
||||
roles:
|
||||
- kdump
|
||||
+
|
||||
+ pre_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
+ post_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: restore_services_state.yml
|
||||
diff --git a/tests/tests_default_wrapper.yml b/tests/tests_default_wrapper.yml
|
||||
index 2763fbd..617acb3 100644
|
||||
index 2763fbd..95b3886 100644
|
||||
--- a/tests/tests_default_wrapper.yml
|
||||
+++ b/tests/tests_default_wrapper.yml
|
||||
@@ -1,6 +1,9 @@
|
||||
@ -76,7 +71,7 @@ index 2763fbd..617acb3 100644
|
||||
- name: Create static inventory from hostvars
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+# - 'tests::tier1'
|
||||
+ - 'tests::slow'
|
||||
tasks:
|
||||
- name: create temporary file
|
||||
@ -86,15 +81,62 @@ index 2763fbd..617acb3 100644
|
||||
|
||||
- name: Run tests_default.yml normally
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+# - 'tests::tier1'
|
||||
+ - 'tests::slow'
|
||||
import_playbook: tests_default.yml
|
||||
|
||||
- name: Run tests_default.yml in check_mode
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+# - 'tests::tier1'
|
||||
+ - 'tests::slow'
|
||||
tasks:
|
||||
- name: Run ansible-playbook with tests_default.yml in check mode
|
||||
command: ansible-playbook -vvv -i {{ tempinventory.path }} --check tests_default.yml
|
||||
diff --git a/tests/tests_ssh.yml b/tests/tests_ssh.yml
|
||||
index 14a59d9..23bc7eb 100644
|
||||
--- a/tests/tests_ssh.yml
|
||||
+++ b/tests/tests_ssh.yml
|
||||
@@ -11,6 +11,13 @@
|
||||
# this is the address at which the ssh dump server can be reached
|
||||
# from the managed host. Dumps will be uploaded there.
|
||||
kdump_ssh_server_inside: "{{ kdump_ssh_source if kdump_ssh_source in hostvars[kdump_ssh_server_outside]['ansible_all_ipv4_addresses'] + hostvars[kdump_ssh_server_outside]['ansible_all_ipv6_addresses'] else hostvars[kdump_ssh_server_outside]['ansible_default_ipv4']['address'] }}"
|
||||
+ tags:
|
||||
+ # this test executes some tasks on localhost and relies on
|
||||
+ # localhost being a different host than the managed host
|
||||
+ # (localhost is being used as a second host in multihost
|
||||
+ # scenario). This also means that localhost must be capable
|
||||
+ # enough (not just a container - must be runnign a sshd).
|
||||
+ - 'tests::multihost_localhost'
|
||||
|
||||
tasks:
|
||||
- name: gather facts from {{ kdump_ssh_server_outside }}
|
||||
diff --git a/tests/tests_ssh_wrapper.yml b/tests/tests_ssh_wrapper.yml
|
||||
index 9a8ecfd..1a6db73 100644
|
||||
--- a/tests/tests_ssh_wrapper.yml
|
||||
+++ b/tests/tests_ssh_wrapper.yml
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
- name: Create static inventory from hostvars
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::slow'
|
||||
tasks:
|
||||
- name: create temporary file
|
||||
tempfile:
|
||||
@@ -17,10 +19,15 @@
|
||||
|
||||
|
||||
- name: Run tests_ssh.yml normally
|
||||
+ tags:
|
||||
+ - 'tests::slow'
|
||||
import_playbook: tests_ssh.yml
|
||||
|
||||
- name: Run tests_ssh.yml in check_mode
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::slow'
|
||||
+ - 'tests::multihost_localhost'
|
||||
tasks:
|
||||
- name: Run ansible-playbook with tests_ssh.yml in check mode
|
||||
command: ansible-playbook -vvv -i {{ tempinventory.path }} --check tests_ssh.yml
|
||||
|
@ -1,6 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
for file in "$@"; do
|
||||
pandoc -f markdown_github "${file}" -t asciidoc -o "${file%.md}.tmp.adoc" ||exit $?
|
||||
touch -r "${file}" "${file%.md}.tmp.adoc" ||exit $?
|
||||
TZ=UTC asciidoc -o "${file%.md}.html" -a footer-style=none -a toc2 -a source-highlighter=highlight "${file%.md}.tmp.adoc" ||exit $?
|
||||
pandoc -f markdown_github "${file}" -t asciidoc -o "${file%.md}.tmp.adoc"
|
||||
touch -r "${file}" "${file%.md}.tmp.adoc"
|
||||
TZ=UTC asciidoc -o "${file%.md}.html" -a footer-style=none -a toc2 -a source-highlighter=highlight "${file%.md}.tmp.adoc"
|
||||
rm "${file%.md}.tmp.adoc"
|
||||
done
|
||||
|
@ -1,59 +1,290 @@
|
||||
diff --git a/tests/commonvars.yml b/tests/commonvars.yml
|
||||
new file mode 100644
|
||||
index 0000000..50452f7
|
||||
--- /dev/null
|
||||
+++ b/tests/commonvars.yml
|
||||
@@ -0,0 +1,2 @@
|
||||
+restore_services:
|
||||
+ - NetworkManager
|
||||
diff --git a/tests/get_services_state.yml b/tests/get_services_state.yml
|
||||
new file mode 100644
|
||||
index 0000000..4fe5d36
|
||||
--- /dev/null
|
||||
+++ b/tests/get_services_state.yml
|
||||
@@ -0,0 +1,4 @@
|
||||
+- name: Get initial state of services
|
||||
+ tags: tests::cleanup
|
||||
+ service_facts:
|
||||
+ register: initial_state
|
||||
diff --git a/tests/playbooks/tests_states.yml b/tests/playbooks/tests_states.yml
|
||||
index 7a1e207..3c1f65d 100644
|
||||
--- a/tests/playbooks/tests_states.yml
|
||||
+++ b/tests/playbooks/tests_states.yml
|
||||
@@ -1,6 +1,8 @@
|
||||
diff --git a/tests/playbooks/tests_802_1x.yml b/tests/playbooks/tests_802_1x.yml
|
||||
index 9cce1ae..76d99e9 100644
|
||||
--- a/tests/playbooks/tests_802_1x.yml
|
||||
+++ b/tests/playbooks/tests_802_1x.yml
|
||||
@@ -1,5 +1,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
+- name: Save host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/save_state.yml
|
||||
+
|
||||
- hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
vars:
|
||||
interface: statebr
|
||||
profile: "{{ interface }}"
|
||||
@@ -22,6 +24,8 @@
|
||||
ip:
|
||||
dhcp4: false
|
||||
auto6: false
|
||||
interface: 802-1x-test
|
||||
@@ -122,3 +127,8 @@
|
||||
command: update-ca-trust
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
+
|
||||
+- name: Restore host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/playbooks/tests_bond.yml b/tests/playbooks/tests_bond.yml
|
||||
index ab3ee43..d646a0b 100644
|
||||
--- a/tests/playbooks/tests_bond.yml
|
||||
+++ b/tests/playbooks/tests_bond.yml
|
||||
@@ -1,5 +1,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
+- name: Save host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/save_state.yml
|
||||
+
|
||||
- hosts: all
|
||||
vars:
|
||||
master_profile: bond0
|
||||
@@ -94,3 +99,8 @@
|
||||
- import_tasks: tasks/remove_test_interfaces_with_dhcp.yml
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
+
|
||||
+- name: Restore host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/playbooks/tests_bridge.yml b/tests/playbooks/tests_bridge.yml
|
||||
index d79d6ad..c8cf3cd 100644
|
||||
--- a/tests/playbooks/tests_bridge.yml
|
||||
+++ b/tests/playbooks/tests_bridge.yml
|
||||
@@ -1,5 +1,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
+- name: Save host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/save_state.yml
|
||||
+
|
||||
- name: Test configuring bridges
|
||||
hosts: all
|
||||
vars:
|
||||
@@ -14,6 +19,8 @@
|
||||
|
||||
- name: Add test bridge
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::net::bridge'
|
||||
- include_tasks: tasks/assert-device_present.yml
|
||||
- include_tasks: tasks/assert-profile_present.yml
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ interface }}"
|
||||
@@ -36,11 +43,15 @@
|
||||
task: tasks/assert_profile_present.yml
|
||||
|
||||
@@ -47,3 +51,28 @@
|
||||
state: down
|
||||
- include_tasks: tasks/assert-device_absent.yml
|
||||
- include_tasks: tasks/assert-profile_absent.yml
|
||||
- import_playbook: down_profile.yml
|
||||
+ tags:
|
||||
+ - 'tests::net::bridge'
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# FIXME: assert profile/device down
|
||||
|
||||
- import_playbook: remove_profile.yml
|
||||
+ tags:
|
||||
+ - 'tests::net::bridge'
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
|
||||
@@ -51,5 +62,19 @@
|
||||
|
||||
# FIXME: Devices might still be left when profile is absent
|
||||
# - import_playbook: run_tasks.yml
|
||||
-# vars:
|
||||
+# vars:
|
||||
# task: tasks/assert_device_absent.yml
|
||||
+
|
||||
+- name: Remove test bridge
|
||||
+ hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::cleanup'
|
||||
+ - 'tests::net::bridge::cleanup'
|
||||
+ tasks:
|
||||
+ - command: 'ip link delete "{{ interface }}"'
|
||||
+ ignore_errors: yes
|
||||
+
|
||||
+- name: Restore host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/playbooks/tests_checkpoint_cleanup.yml b/tests/playbooks/tests_checkpoint_cleanup.yml
|
||||
index 18e3fd7..3b5a41a 100644
|
||||
--- a/tests/playbooks/tests_checkpoint_cleanup.yml
|
||||
+++ b/tests/playbooks/tests_checkpoint_cleanup.yml
|
||||
@@ -4,6 +4,11 @@
|
||||
# mark a device as unmanaged for NM and then tries to activiate it using NM.
|
||||
# This failed without removing the checkpoint.
|
||||
---
|
||||
+- name: Save host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/save_state.yml
|
||||
+
|
||||
- hosts: all
|
||||
vars:
|
||||
interface: cptstbr
|
||||
@@ -80,3 +85,8 @@
|
||||
ignore_errors: true
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
+
|
||||
+- name: Restore host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/playbooks/tests_ethernet.yml b/tests/playbooks/tests_ethernet.yml
|
||||
index cd02579..adcffee 100644
|
||||
--- a/tests/playbooks/tests_ethernet.yml
|
||||
+++ b/tests/playbooks/tests_ethernet.yml
|
||||
@@ -1,5 +1,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
+- name: Save host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/save_state.yml
|
||||
+
|
||||
- hosts: all
|
||||
tasks:
|
||||
- debug:
|
||||
@@ -9,6 +14,8 @@
|
||||
|
||||
- name: Test configuring ethernet devices
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::net::veth'
|
||||
vars:
|
||||
type: veth
|
||||
interface: lsr27
|
||||
@@ -26,6 +33,8 @@
|
||||
|
||||
- name: Test static interface up
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::net::reconf'
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ interface }}"
|
||||
@@ -48,17 +57,29 @@
|
||||
# FIXME: assert profile present
|
||||
# FIXME: assert profile/device up + IP address
|
||||
- import_playbook: down_profile.yml
|
||||
+ tags:
|
||||
+ - 'tests::cleanup'
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# FIXME: assert profile/device down
|
||||
- import_playbook: remove_profile.yml
|
||||
+ tags:
|
||||
+ - 'tests::cleanup'
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# FIXME: assert profile away
|
||||
- name: Remove interfaces
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::cleanup'
|
||||
+ - 'tests::net::veth::cleanup'
|
||||
tasks:
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
- include_tasks: tasks/assert_device_absent.yml
|
||||
+
|
||||
+- name: Restore host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/playbooks/tests_ethtool_features.yml b/tests/playbooks/tests_ethtool_features.yml
|
||||
index 43fddc3..d1a87fe 100644
|
||||
--- a/tests/playbooks/tests_ethtool_features.yml
|
||||
+++ b/tests/playbooks/tests_ethtool_features.yml
|
||||
@@ -1,5 +1,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
+- name: Save host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/save_state.yml
|
||||
+
|
||||
- hosts: all
|
||||
vars:
|
||||
interface: testnic1
|
||||
@@ -198,3 +203,8 @@
|
||||
state: absent
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
+
|
||||
+- name: Restore host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/playbooks/tests_provider.yml b/tests/playbooks/tests_provider.yml
|
||||
index 1db2d08..e097b4b 100644
|
||||
--- a/tests/playbooks/tests_provider.yml
|
||||
+++ b/tests/playbooks/tests_provider.yml
|
||||
@@ -1,5 +1,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
+- name: Save host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/save_state.yml
|
||||
+
|
||||
- hosts: all
|
||||
vars:
|
||||
interface: testnic1
|
||||
@@ -33,3 +38,8 @@
|
||||
- tasks/cleanup_profile+device.yml
|
||||
tags:
|
||||
- tests::provider:initscripts_to_nm
|
||||
+
|
||||
+- name: Restore host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/playbooks/tests_reapply.yml b/tests/playbooks/tests_reapply.yml
|
||||
index 4b1cb09..6995607 100644
|
||||
--- a/tests/playbooks/tests_reapply.yml
|
||||
+++ b/tests/playbooks/tests_reapply.yml
|
||||
@@ -4,6 +4,11 @@
|
||||
# of via Ansible. Until there is better test support for this, just check the
|
||||
# log output for the respective log message.
|
||||
---
|
||||
+- name: Save host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/save_state.yml
|
||||
+
|
||||
- hosts: all
|
||||
vars:
|
||||
interface: rpltstbr
|
||||
@@ -64,3 +69,8 @@
|
||||
ignore_errors: true
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
+
|
||||
+- name: Restore host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/playbooks/tests_states.yml b/tests/playbooks/tests_states.yml
|
||||
index eec27c0..a8d0ecd 100644
|
||||
--- a/tests/playbooks/tests_states.yml
|
||||
+++ b/tests/playbooks/tests_states.yml
|
||||
@@ -135,3 +135,23 @@
|
||||
- tasks/cleanup_profile+device.yml
|
||||
tags:
|
||||
- tests::states:remove_down_twice
|
||||
+
|
||||
+ pre_tasks:
|
||||
+ - name: Save host state
|
||||
+ tags:
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ import_tasks: "../save_state.yml"
|
||||
+ import_tasks: tasks/save_state.yml
|
||||
+
|
||||
+ post_tasks:
|
||||
+ - name: Remove test profile
|
||||
+ tags:
|
||||
+ - 'tests::cleanup'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ - 'tests::net::bridge::cleanup'
|
||||
+ import_role:
|
||||
+ name: linux-system-roles.network
|
||||
@ -64,72 +295,97 @@ index 7a1e207..3c1f65d 100644
|
||||
+ persistent_state: absent
|
||||
+
|
||||
+ - name: Restore host state
|
||||
+ tags:
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ import_tasks: "../restore_state.yml"
|
||||
+ import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/playbooks/tests_vlan_mtu.yml b/tests/playbooks/tests_vlan_mtu.yml
|
||||
index ae0322e..bf6e518 100644
|
||||
index 029b599..378d5fe 100644
|
||||
--- a/tests/playbooks/tests_vlan_mtu.yml
|
||||
+++ b/tests/playbooks/tests_vlan_mtu.yml
|
||||
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
- hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
vars:
|
||||
type: veth
|
||||
interface: lsr101
|
||||
@@ -10,6 +12,8 @@
|
||||
- include_tasks: tasks/manage-test-interface.yml
|
||||
@@ -10,6 +10,8 @@
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: present
|
||||
+ tags:
|
||||
+ - 'tests::net::veth'
|
||||
- include_tasks: tasks/assert-device_present.yml
|
||||
- name: "TEST: I can configure the MTU for a vlan interface without autoconnect."
|
||||
debug:
|
||||
@@ -37,6 +41,8 @@
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
- name: >-
|
||||
TEST: I can configure the MTU for a vlan interface without autoconnect.
|
||||
@@ -38,6 +40,8 @@
|
||||
ip:
|
||||
dhcp4: false
|
||||
auto6: false
|
||||
+ tags:
|
||||
+ - 'tests::net::reconf'
|
||||
- include_tasks: tasks/assert-device_present.yml
|
||||
- include_tasks: tasks/assert_device_present.yml
|
||||
vars:
|
||||
interface: "{{ vlan_interface }}"
|
||||
@@ -61,6 +67,26 @@
|
||||
@@ -62,6 +66,20 @@
|
||||
persistent_state: absent
|
||||
state: down
|
||||
ignore_errors: true
|
||||
+ tags:
|
||||
+ - 'tests::cleanup'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ - 'tests::net::veth::cleanup'
|
||||
- include_tasks: tasks/manage-test-interface.yml
|
||||
- include_tasks: tasks/manage_test_interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
+ tags:
|
||||
+ - 'tests::cleanup'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ - 'tests::net::veth::cleanup'
|
||||
+
|
||||
+ pre_tasks:
|
||||
+ - name: Save host state
|
||||
+ tags:
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ import_tasks: "../save_state.yml"
|
||||
+ import_tasks: tasks/save_state.yml
|
||||
+
|
||||
+ post_tasks:
|
||||
+ - name: Restore host state
|
||||
+ tags:
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ import_tasks: "../restore_state.yml"
|
||||
diff --git a/tests/restore_services_state.yml b/tests/restore_services_state.yml
|
||||
+ import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/playbooks/tests_wireless.yml b/tests/playbooks/tests_wireless.yml
|
||||
index 822a15e..52661bd 100644
|
||||
--- a/tests/playbooks/tests_wireless.yml
|
||||
+++ b/tests/playbooks/tests_wireless.yml
|
||||
@@ -1,5 +1,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
+- name: Save host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/save_state.yml
|
||||
+
|
||||
- hosts: all
|
||||
vars:
|
||||
interface: wlan0
|
||||
@@ -86,3 +91,8 @@
|
||||
- include_tasks: tasks/cleanup_mock_wifi.yml
|
||||
tags:
|
||||
- "tests::cleanup"
|
||||
+
|
||||
+- name: Restore host state
|
||||
+ hosts: all
|
||||
+ tasks:
|
||||
+ - import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/tasks/commonvars.yml b/tests/tasks/commonvars.yml
|
||||
new file mode 100644
|
||||
index 0000000..50452f7
|
||||
--- /dev/null
|
||||
+++ b/tests/tasks/commonvars.yml
|
||||
@@ -0,0 +1,2 @@
|
||||
+restore_services:
|
||||
+ - NetworkManager
|
||||
diff --git a/tests/tasks/get_services_state.yml b/tests/tasks/get_services_state.yml
|
||||
new file mode 100644
|
||||
index 0000000..4fe5d36
|
||||
--- /dev/null
|
||||
+++ b/tests/tasks/get_services_state.yml
|
||||
@@ -0,0 +1,4 @@
|
||||
+- name: Get initial state of services
|
||||
+ tags: tests::cleanup
|
||||
+ service_facts:
|
||||
+ register: initial_state
|
||||
diff --git a/tests/tasks/restore_services_state.yml b/tests/tasks/restore_services_state.yml
|
||||
new file mode 100644
|
||||
index 0000000..2035dfc
|
||||
--- /dev/null
|
||||
+++ b/tests/restore_services_state.yml
|
||||
+++ b/tests/tasks/restore_services_state.yml
|
||||
@@ -0,0 +1,22 @@
|
||||
+- block:
|
||||
+ - name: load common vars
|
||||
@ -153,11 +409,11 @@ index 0000000..2035dfc
|
||||
+ sname: "{{ item + '.service' }}"
|
||||
+ with_items: "{{ restore_services }}"
|
||||
+ tags: tests::cleanup
|
||||
diff --git a/tests/restore_state.yml b/tests/restore_state.yml
|
||||
diff --git a/tests/tasks/restore_state.yml b/tests/tasks/restore_state.yml
|
||||
new file mode 100644
|
||||
index 0000000..f4e3d5f
|
||||
--- /dev/null
|
||||
+++ b/tests/restore_state.yml
|
||||
+++ b/tests/tasks/restore_state.yml
|
||||
@@ -0,0 +1,24 @@
|
||||
+---
|
||||
+- name: Remove /etc/sysconfig/network if there was no one
|
||||
@ -183,11 +439,11 @@ index 0000000..f4e3d5f
|
||||
+ - final_state.ansible_facts.services[sname]['state'] == 'running'
|
||||
+ vars:
|
||||
+ sname: NetworkManager.service
|
||||
diff --git a/tests/save_state.yml b/tests/save_state.yml
|
||||
diff --git a/tests/tasks/save_state.yml b/tests/tasks/save_state.yml
|
||||
new file mode 100644
|
||||
index 0000000..5690aed
|
||||
--- /dev/null
|
||||
+++ b/tests/save_state.yml
|
||||
+++ b/tests/tasks/save_state.yml
|
||||
@@ -0,0 +1,11 @@
|
||||
+---
|
||||
+- name: Get services state
|
||||
@ -200,352 +456,76 @@ index 0000000..5690aed
|
||||
+ path: /etc/sysconfig/network
|
||||
+ register: etc_sysconfig_network_stat
|
||||
+ ignore_errors: yes
|
||||
diff --git a/tests/tests_bridge.yml b/tests/tests_bridge.yml
|
||||
index 9ead308..394d392 100644
|
||||
--- a/tests/tests_bridge.yml
|
||||
+++ b/tests/tests_bridge.yml
|
||||
@@ -1,7 +1,17 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
+- name: Save host state
|
||||
+ hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ tasks:
|
||||
+ - import_tasks: save_state.yml
|
||||
+
|
||||
- name: Test configuring bridges
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
vars:
|
||||
interface: LSR-TST-br31
|
||||
|
||||
@@ -14,6 +24,9 @@
|
||||
|
||||
- name: Add test bridge
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::net::bridge'
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ interface }}"
|
||||
@@ -27,24 +40,40 @@
|
||||
- linux-system-roles.network
|
||||
|
||||
- import_playbook: run-tasks.yml
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
vars:
|
||||
task: tasks/assert-device_present.yml
|
||||
|
||||
- import_playbook: run-tasks.yml
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
task: tasks/assert-profile_present.yml
|
||||
|
||||
- import_playbook: down-profile.yml
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::cleanup'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ - 'tests::net::bridge::cleanup'
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# FIXME: assert profile/device down
|
||||
|
||||
- import_playbook: remove-profile.yml
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::cleanup'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ - 'tests::net::bridge::cleanup'
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
|
||||
- import_playbook: run-tasks.yml
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
task: tasks/assert-profile_absent.yml
|
||||
@@ -53,3 +82,22 @@
|
||||
#- import_playbook: run-tasks.yml
|
||||
# vars:
|
||||
# task: tasks/assert-device_absent.yml
|
||||
+
|
||||
+- name: Remove test bridge
|
||||
+ hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::cleanup'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ - 'tests::net::bridge::cleanup'
|
||||
+ tasks:
|
||||
+ - command: 'ip link delete "{{ interface }}"'
|
||||
+ ignore_errors: yes
|
||||
+
|
||||
+- name: Restore host state
|
||||
+ hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ tasks:
|
||||
+ - import_tasks: restore_state.yml
|
||||
diff --git a/tests/tests_bridge_other_provider.yml b/tests/tests_bridge_other_provider.yml
|
||||
index e5a4ad7..4d1d2dd 100644
|
||||
--- a/tests/tests_bridge_other_provider.yml
|
||||
+++ b/tests/tests_bridge_other_provider.yml
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
diff --git a/tests/tests_802_1x_nm.yml b/tests/tests_802_1x_nm.yml
|
||||
index 3bd0719..77cf2d9 100644
|
||||
--- a/tests/tests_802_1x_nm.yml
|
||||
+++ b/tests/tests_802_1x_nm.yml
|
||||
@@ -4,6 +4,8 @@
|
||||
# set network provider and gather facts
|
||||
- hosts: all
|
||||
name: Run playbook 'tests_bridge.yml' with non-default provider
|
||||
name: Run playbook 'playbooks/tests_802_1x.yml' with nm as provider
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - tests::expfail
|
||||
tasks:
|
||||
- name: Get service facts
|
||||
service_facts: null
|
||||
- name: Set network provider to 'nm'
|
||||
set_fact:
|
||||
@@ -21,3 +23,5 @@
|
||||
- import_playbook: playbooks/tests_802_1x.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
+ tags:
|
||||
+ - tests::expfail
|
||||
diff --git a/tests/tests_802_1x_updated_nm.yml b/tests/tests_802_1x_updated_nm.yml
|
||||
index 0d4c741..ca666a6 100644
|
||||
--- a/tests/tests_802_1x_updated_nm.yml
|
||||
+++ b/tests/tests_802_1x_updated_nm.yml
|
||||
@@ -4,6 +4,8 @@
|
||||
# set network provider and gather facts
|
||||
- hosts: all
|
||||
name: Run playbook 'playbooks/tests_802_1x_updated.yml' with nm as provider
|
||||
+ tags:
|
||||
+ - tests::expfail
|
||||
tasks:
|
||||
- name: Set network provider to 'nm'
|
||||
set_fact:
|
||||
@@ -21,3 +23,5 @@
|
||||
- import_playbook: playbooks/tests_802_1x_updated.yml
|
||||
when:
|
||||
- ansible_distribution_major_version != '6'
|
||||
+ tags:
|
||||
+ - tests::expfail
|
||||
diff --git a/tests/tests_default.yml b/tests/tests_default.yml
|
||||
index fda6ed5..0ce3ab9 100644
|
||||
index f6f7550..98e3c7e 100644
|
||||
--- a/tests/tests_default.yml
|
||||
+++ b/tests/tests_default.yml
|
||||
@@ -2,5 +2,19 @@
|
||||
---
|
||||
- name: Test executing the role with default parameters
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
roles:
|
||||
- linux-system-roles.network
|
||||
@@ -10,3 +10,11 @@
|
||||
that:
|
||||
- "'warnings' not in __network_connections_result"
|
||||
msg: "There are warnings"
|
||||
+
|
||||
+ pre_tasks:
|
||||
+ - name: Save host state
|
||||
+ tags:
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ import_tasks: save_state.yml
|
||||
+ import_tasks: tasks/save_state.yml
|
||||
+
|
||||
+ post_tasks:
|
||||
+ - name: Restore host state
|
||||
+ tags:
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ import_tasks: restore_state.yml
|
||||
diff --git a/tests/tests_default_other_provider.yml b/tests/tests_default_other_provider.yml
|
||||
index 697bc57..0c70dac 100644
|
||||
--- a/tests/tests_default_other_provider.yml
|
||||
+++ b/tests/tests_default_other_provider.yml
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
- hosts: all
|
||||
name: Run playbook 'tests_default.yml' with non-default provider
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
tasks:
|
||||
- name: Get service facts
|
||||
service_facts: null
|
||||
diff --git a/tests/tests_ethernet.yml b/tests/tests_ethernet.yml
|
||||
index 25f117d..c85f853 100644
|
||||
--- a/tests/tests_ethernet.yml
|
||||
+++ b/tests/tests_ethernet.yml
|
||||
@@ -1,6 +1,16 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
---
|
||||
+- name: Save host state
|
||||
+ hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ tasks:
|
||||
+ - import_tasks: save_state.yml
|
||||
+
|
||||
- hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
tasks:
|
||||
- debug:
|
||||
msg: Inside ethernet tests
|
||||
@@ -9,6 +19,9 @@
|
||||
|
||||
- name: Test configuring ethernet devices
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::net::veth'
|
||||
vars:
|
||||
type: veth
|
||||
interface: lsr27
|
||||
@@ -18,6 +31,7 @@
|
||||
set_fact:
|
||||
type: "{{ type }}"
|
||||
interface: "{{ interface }}"
|
||||
+# cacheable: yes
|
||||
- include_tasks: tasks/show-interfaces.yml
|
||||
- include_tasks: tasks/manage-test-interface.yml
|
||||
vars:
|
||||
@@ -26,6 +40,9 @@
|
||||
|
||||
- name: Test static interface up
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::net::reconf'
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ interface }}"
|
||||
@@ -39,6 +56,8 @@
|
||||
- linux-system-roles.network
|
||||
|
||||
- hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
tasks:
|
||||
- debug:
|
||||
var: network_provider
|
||||
@@ -46,17 +65,38 @@
|
||||
# FIXME: assert profile present
|
||||
# FIXME: assert profile/device up + IP address
|
||||
- import_playbook: down-profile.yml
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::cleanup'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# FIXME: assert profile/device down
|
||||
- import_playbook: remove-profile.yml
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::cleanup'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
vars:
|
||||
profile: "{{ interface }}"
|
||||
# FIXME: assert profile away
|
||||
- name: Remove interfaces
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::cleanup'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ - 'tests::net::veth::cleanup'
|
||||
tasks:
|
||||
- include_tasks: tasks/manage-test-interface.yml
|
||||
vars:
|
||||
state: absent
|
||||
- include_tasks: tasks/assert-device_absent.yml
|
||||
+
|
||||
+- name: Restore host state
|
||||
+ hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ tasks:
|
||||
+ - import_tasks: restore_state.yml
|
||||
diff --git a/tests/tests_ethernet_other_provider.yml b/tests/tests_ethernet_other_provider.yml
|
||||
index 456b052..5a5dbb0 100644
|
||||
--- a/tests/tests_ethernet_other_provider.yml
|
||||
+++ b/tests/tests_ethernet_other_provider.yml
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
- hosts: all
|
||||
name: Run playbook 'tests_ethernet.yml' with non-default provider
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
tasks:
|
||||
- name: Get service facts
|
||||
service_facts: null
|
||||
diff --git a/tests/tests_helpers-and-asserts.yml b/tests/tests_helpers-and-asserts.yml
|
||||
index 36f02c2..b44599a 100644
|
||||
--- a/tests/tests_helpers-and-asserts.yml
|
||||
+++ b/tests/tests_helpers-and-asserts.yml
|
||||
@@ -2,6 +2,8 @@
|
||||
---
|
||||
- name: Check that creating and removing test devices and assertions work
|
||||
hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
tasks:
|
||||
- name: test veth interface management
|
||||
include_tasks: tasks/create-and-remove-interface.yml
|
||||
@@ -15,6 +17,18 @@
|
||||
+ import_tasks: tasks/restore_state.yml
|
||||
diff --git a/tests/tests_helpers_and_asserts.yml b/tests/tests_helpers_and_asserts.yml
|
||||
index 5514182..d9bfa11 100644
|
||||
--- a/tests/tests_helpers_and_asserts.yml
|
||||
+++ b/tests/tests_helpers_and_asserts.yml
|
||||
@@ -15,6 +15,14 @@
|
||||
type: dummy
|
||||
interface: dummy1298
|
||||
|
||||
+ pre_tasks:
|
||||
+ - name: Save host state
|
||||
+ tags:
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ import_tasks: save_state.yml
|
||||
+ import_tasks: tasks/save_state.yml
|
||||
+
|
||||
+ post_tasks:
|
||||
+ - name: Restore host state
|
||||
+ tags:
|
||||
+ - 'tests::tier1::cleanup'
|
||||
+ import_tasks: restore_state.yml
|
||||
+ import_tasks: tasks/restore_state.yml
|
||||
+
|
||||
# FIXME: when: does not seem to work with include_tasks, therefore this cannot be safely tested for now
|
||||
# FIXME: when: does not seem to work with include_tasks, therefore this cannot
|
||||
# be safely tested for now
|
||||
# - name: test tap interfaces
|
||||
# include_tasks: tasks/create-and-remove-interface.yml
|
||||
diff --git a/tests/tests_states.yml b/tests/tests_states.yml
|
||||
index eff3436..46cfe87 100644
|
||||
--- a/tests/tests_states.yml
|
||||
+++ b/tests/tests_states.yml
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
# empty playbook to gather facts for import_playbook when clause
|
||||
- hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
|
||||
# workaround for: https://github.com/ansible/ansible/issues/27973
|
||||
# There is no way in Ansible to abort a playbook hosts with specific OS
|
||||
diff --git a/tests/tests_unit.yml b/tests/tests_unit.yml
|
||||
index c6ea4ef..8d56cf4 100644
|
||||
--- a/tests/tests_unit.yml
|
||||
+++ b/tests/tests_unit.yml
|
||||
@@ -2,6 +2,8 @@
|
||||
---
|
||||
- hosts: all
|
||||
name: Setup for test running
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
tasks:
|
||||
- name: Install EPEL on enterprise Linux for python2-mock
|
||||
command: yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
|
||||
@@ -27,6 +29,8 @@
|
||||
|
||||
- hosts: all
|
||||
name: execute python unit tests
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
tasks:
|
||||
- name: Copy python modules
|
||||
copy:
|
||||
diff --git a/tests/tests_vlan_mtu_initscripts.yml b/tests/tests_vlan_mtu_initscripts.yml
|
||||
index a57db4b..d3a48c7 100644
|
||||
--- a/tests/tests_vlan_mtu_initscripts.yml
|
||||
+++ b/tests/tests_vlan_mtu_initscripts.yml
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
# set network provider and gather facts
|
||||
- hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
tasks:
|
||||
- name: Set network provider to 'initscripts'
|
||||
set_fact:
|
||||
diff --git a/tests/tests_vlan_mtu_nm.yml b/tests/tests_vlan_mtu_nm.yml
|
||||
index d830817..68b61b5 100644
|
||||
--- a/tests/tests_vlan_mtu_nm.yml
|
||||
+++ b/tests/tests_vlan_mtu_nm.yml
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
# set network provider and gather facts
|
||||
- hosts: all
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
tasks:
|
||||
- name: Set network provider to 'nm'
|
||||
set_fact:
|
||||
|
16
SOURCES/postfix-meta-el8.diff
Normal file
16
SOURCES/postfix-meta-el8.diff
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/meta/main.yml b/meta/main.yml
|
||||
index a0ef6f4..da22270 100644
|
||||
--- a/meta/main.yml
|
||||
+++ b/meta/main.yml
|
||||
@@ -7,8 +7,8 @@ galaxy_info:
|
||||
min_ansible_version: 2.2
|
||||
platforms:
|
||||
- name: Fedora
|
||||
- versions: [ 24, 25 ]
|
||||
+ versions: [ 31, 32 ]
|
||||
- name: EL
|
||||
- versions: [ 6, 7 ]
|
||||
+ versions: [ 6, 7, 8 ]
|
||||
|
||||
|
||||
|
@ -1,62 +0,0 @@
|
||||
diff --git a/library/network_connections.py b/library/network_connections.py
|
||||
index 39e81e8..6fa5e2f 100644
|
||||
--- a/library/network_connections.py
|
||||
+++ b/library/network_connections.py
|
||||
@@ -1369,6 +1369,13 @@ class NMUtil:
|
||||
finally:
|
||||
ac.handler_disconnect(ac_id)
|
||||
|
||||
+ def reapply(self, device, connection=None):
|
||||
+ version_id = 0
|
||||
+ flags = 0
|
||||
+ return Util.call_async_method(
|
||||
+ device, "reapply", [connection, version_id, flags]
|
||||
+ )
|
||||
+
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -2088,6 +2095,9 @@ class Cmd_nm(Cmd):
|
||||
)
|
||||
self.connections_data_set_changed(idx)
|
||||
if self.check_mode == CheckMode.REAL_RUN:
|
||||
+ if self._try_reapply(idx, con):
|
||||
+ return
|
||||
+
|
||||
try:
|
||||
ac = self.nmutil.connection_activate(con)
|
||||
except MyError as e:
|
||||
@@ -2102,6 +2112,33 @@ class Cmd_nm(Cmd):
|
||||
except MyError as e:
|
||||
self.log_error(idx, "up connection failed while waiting: %s" % (e))
|
||||
|
||||
+ def _try_reapply(self, idx, con):
|
||||
+ """ Try to reapply a connection
|
||||
+
|
||||
+ If there is exactly one active connection with the same UUID activated
|
||||
+ on exactly one device, ask the device to reapply the connection.
|
||||
+
|
||||
+ :returns: `True`, when the connection was reapplied, `False` otherwise
|
||||
+ :rtype: bool
|
||||
+ """
|
||||
+ NM = Util.NM()
|
||||
+
|
||||
+ acons = list(self.nmutil.active_connection_list(connections=[con]))
|
||||
+ if len(acons) != 1:
|
||||
+ return False
|
||||
+
|
||||
+ active_connection = acons[0]
|
||||
+ if active_connection.get_state() == NM.ActiveConnectionState.ACTIVATED:
|
||||
+ devices = active_connection.get_devices()
|
||||
+ if len(devices) == 1:
|
||||
+ try:
|
||||
+ self.nmutil.reapply(devices[0])
|
||||
+ self.log_info(idx, "connection reapplied")
|
||||
+ return True
|
||||
+ except MyError as error:
|
||||
+ self.log_info(idx, "connection reapply failed: %s" % (error))
|
||||
+ return False
|
||||
+
|
||||
def run_action_down(self, idx):
|
||||
connection = self.connections[idx]
|
||||
|
@ -1,45 +1,94 @@
|
||||
diff --git a/examples/bond-with-vlan.yml b/examples/bond-with-vlan.yml
|
||||
diff --git a/examples/bond_simple.yml b/examples/bond_simple.yml
|
||||
index 4ca9811..f6f5897 100644
|
||||
--- a/examples/bond_simple.yml
|
||||
+++ b/examples/bond_simple.yml
|
||||
@@ -32,5 +32,5 @@
|
||||
interface_name: eth2
|
||||
master: bond0
|
||||
roles:
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
...
|
||||
diff --git a/examples/bond_with_vlan.yml b/examples/bond_with_vlan.yml
|
||||
index 2e6be23..3b7a6dc 100644
|
||||
--- a/examples/bond-with-vlan.yml
|
||||
+++ b/examples/bond-with-vlan.yml
|
||||
--- a/examples/bond_with_vlan.yml
|
||||
+++ b/examples/bond_with_vlan.yml
|
||||
@@ -35,4 +35,4 @@
|
||||
- "192.0.2.{{ network_iphost }}/24"
|
||||
|
||||
roles:
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
diff --git a/examples/bridge-with-vlan.yml b/examples/bridge-with-vlan.yml
|
||||
diff --git a/examples/bridge_with_vlan.yml b/examples/bridge_with_vlan.yml
|
||||
index 037ff8e..83c586d 100644
|
||||
--- a/examples/bridge-with-vlan.yml
|
||||
+++ b/examples/bridge-with-vlan.yml
|
||||
--- a/examples/bridge_with_vlan.yml
|
||||
+++ b/examples/bridge_with_vlan.yml
|
||||
@@ -33,4 +33,4 @@
|
||||
- "192.0.2.{{ network_iphost }}/24"
|
||||
|
||||
roles:
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
diff --git a/examples/eth-simple-auto.yml b/examples/eth-simple-auto.yml
|
||||
diff --git a/examples/eth_simple_auto.yml b/examples/eth_simple_auto.yml
|
||||
index 0ba168a..e4c4a54 100644
|
||||
--- a/examples/eth-simple-auto.yml
|
||||
+++ b/examples/eth-simple-auto.yml
|
||||
--- a/examples/eth_simple_auto.yml
|
||||
+++ b/examples/eth_simple_auto.yml
|
||||
@@ -15,4 +15,4 @@
|
||||
mtu: 1450
|
||||
|
||||
roles:
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
diff --git a/examples/eth-with-vlan.yml b/examples/eth-with-vlan.yml
|
||||
--- a/examples/eth-with-vlan.yml 2018-08-21 20:47:38.000000000 +0200
|
||||
+++ b/examples/eth-with-vlan.yml 2018-11-06 22:29:14.591770335 +0100
|
||||
diff --git a/examples/eth_with_802_1x.yml b/examples/eth_with_802_1x.yml
|
||||
index 92a93a9..7731b7d 100644
|
||||
--- a/examples/eth_with_802_1x.yml
|
||||
+++ b/examples/eth_with_802_1x.yml
|
||||
@@ -27,4 +27,4 @@
|
||||
- client.pem
|
||||
- cacert.pem
|
||||
roles:
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
diff --git a/examples/eth_with_vlan.yml b/examples/eth_with_vlan.yml
|
||||
index 69da673..e0c2f11 100644
|
||||
--- a/examples/eth_with_vlan.yml
|
||||
+++ b/examples/eth_with_vlan.yml
|
||||
@@ -26,4 +26,4 @@
|
||||
- "192.0.2.{{ network_iphost }}/24"
|
||||
|
||||
roles:
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
diff --git a/examples/ethtool_features.yml b/examples/ethtool_features.yml
|
||||
index c580f89..0881316 100644
|
||||
--- a/examples/ethtool_features.yml
|
||||
+++ b/examples/ethtool_features.yml
|
||||
@@ -3,7 +3,7 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- include_role:
|
||||
- name: linux-system-roles.network
|
||||
+ name: rhel-system-roles.network
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ network_interface_name1 }}"
|
||||
diff --git a/examples/ethtool_features_default.yml b/examples/ethtool_features_default.yml
|
||||
index 78965e6..3cdd731 100644
|
||||
--- a/examples/ethtool_features_default.yml
|
||||
+++ b/examples/ethtool_features_default.yml
|
||||
@@ -3,7 +3,7 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- include_role:
|
||||
- name: linux-system-roles.network
|
||||
+ name: rhel-system-roles.network
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ network_interface_name1 }}"
|
||||
diff --git a/examples/infiniband.yml b/examples/infiniband.yml
|
||||
--- a/examples/infiniband.yml 2018-08-21 20:47:38.000000000 +0200
|
||||
+++ b/examples/infiniband.yml 2018-11-06 22:29:14.591770335 +0100
|
||||
index 22603d9..9e7e267 100644
|
||||
--- a/examples/infiniband.yml
|
||||
+++ b/examples/infiniband.yml
|
||||
@@ -23,4 +23,4 @@
|
||||
- 198.51.100.133/30
|
||||
|
||||
@ -47,6 +96,7 @@ diff --git a/examples/infiniband.yml b/examples/infiniband.yml
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
diff --git a/examples/macvlan.yml b/examples/macvlan.yml
|
||||
index 90cd09d..0064ad4 100644
|
||||
--- a/examples/macvlan.yml
|
||||
+++ b/examples/macvlan.yml
|
||||
@@ -26,4 +26,4 @@
|
||||
@ -55,29 +105,44 @@ diff --git a/examples/macvlan.yml b/examples/macvlan.yml
|
||||
roles:
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
diff --git a/examples/ethtool-features-default.yml b/examples/ethtool-features-default.yml
|
||||
index 78965e6..3cdd731 100644
|
||||
--- a/examples/ethtool-features-default.yml
|
||||
+++ b/examples/ethtool-features-default.yml
|
||||
@@ -3,7 +3,7 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- include_role:
|
||||
- name: linux-system-roles.network
|
||||
+ name: rhel-system-roles.network
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ network_interface_name1 }}"
|
||||
diff --git a/examples/ethtool-features.yml b/examples/ethtool-features.yml
|
||||
index d8842c2..b32ad0b 100644
|
||||
--- a/examples/ethtool-features.yml
|
||||
+++ b/examples/ethtool-features.yml
|
||||
@@ -3,7 +3,7 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- include_role:
|
||||
- name: linux-system-roles.network
|
||||
+ name: rhel-system-roles.network
|
||||
vars:
|
||||
network_connections:
|
||||
- name: "{{ network_interface_name1 }}"
|
||||
diff --git a/examples/remove+down_profile.yml b/examples/remove+down_profile.yml
|
||||
index da2b1b8..f2d93e8 100644
|
||||
--- a/examples/remove+down_profile.yml
|
||||
+++ b/examples/remove+down_profile.yml
|
||||
@@ -8,5 +8,5 @@
|
||||
persistent_state: absent
|
||||
state: down
|
||||
roles:
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
...
|
||||
diff --git a/examples/wireless_wpa_psk.yml b/examples/wireless_wpa_psk.yml
|
||||
index eeec22f..60b0d83 100644
|
||||
--- a/examples/wireless_wpa_psk.yml
|
||||
+++ b/examples/wireless_wpa_psk.yml
|
||||
@@ -12,4 +12,4 @@
|
||||
# see https://docs.ansible.com/ansible/latest/user_guide/vault.html
|
||||
password: "p@55w0rD"
|
||||
roles:
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
diff --git a/tests/playbooks/down_profile.yml b/tests/playbooks/down_profile.yml
|
||||
index 5087240..65e542d 100644
|
||||
--- a/tests/playbooks/down_profile.yml
|
||||
+++ b/tests/playbooks/down_profile.yml
|
||||
@@ -7,4 +7,4 @@
|
||||
- name: "{{ profile }}"
|
||||
state: down
|
||||
roles:
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
diff --git a/tests/playbooks/remove_profile.yml b/tests/playbooks/remove_profile.yml
|
||||
index a50e848..b6e6796 100644
|
||||
--- a/tests/playbooks/remove_profile.yml
|
||||
+++ b/tests/playbooks/remove_profile.yml
|
||||
@@ -7,4 +7,4 @@
|
||||
- name: "{{ profile }}"
|
||||
persistent_state: absent
|
||||
roles:
|
||||
- - linux-system-roles.network
|
||||
+ - rhel-system-roles.network
|
||||
|
@ -2,7 +2,7 @@ diff --git a/README.md b/README.md
|
||||
index c2debc9..d9e40b3 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -81,7 +81,7 @@ Example Playbook
|
||||
@@ -154,7 +154,7 @@ Example Playbook
|
||||
- hosts: all
|
||||
|
||||
roles:
|
||||
|
@ -15,14 +15,42 @@ index f294101..7571066 100644
|
||||
- name: Get local modifications - boolean
|
||||
command: /usr/sbin/semanage boolean -l -n -C
|
||||
register: selinux_role_boolean
|
||||
diff --git a/tests/tests_all_purge.yml b/tests/tests_all_purge.yml
|
||||
index 03dfe05..c686837 100644
|
||||
--- a/tests/tests_all_purge.yml
|
||||
+++ b/tests/tests_all_purge.yml
|
||||
@@ -14,7 +14,9 @@
|
||||
name:
|
||||
- policycoreutils-python-utils
|
||||
state: present
|
||||
- when: ansible_distribution == "Fedora"
|
||||
+ when: ansible_distribution == "Fedora" or
|
||||
+ ( ansible_distribution_major_version > "7" and
|
||||
+ ( ansible_distribution == "CentOS" or ansible_distribution == "RedHat" ))
|
||||
|
||||
- name: Add a Linux System Roles SELinux User
|
||||
user:
|
||||
diff --git a/tests/tests_all_transitions.yml b/tests/tests_all_transitions.yml
|
||||
index f608a42..d0d209b 100644
|
||||
--- a/tests/tests_all_transitions.yml
|
||||
+++ b/tests/tests_all_transitions.yml
|
||||
@@ -1,6 +1,8 @@
|
||||
- name: Test all the possible selinux_state transitions
|
||||
hosts: all
|
||||
become: true
|
||||
+ tags:
|
||||
+ - 'tests::reboot'
|
||||
vars:
|
||||
states:
|
||||
- permissive
|
||||
diff --git a/tests/tests_boolean.yml b/tests/tests_boolean.yml
|
||||
index 47eafc0..ca85922 100644
|
||||
index 47eafc0..2aa0025 100644
|
||||
--- a/tests/tests_boolean.yml
|
||||
+++ b/tests/tests_boolean.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Check if selinux role sets SELinux booleans
|
||||
+ tags: [ 'tests::tier1', 'tests::expfail' ]
|
||||
+ tags: tests::expfail
|
||||
hosts: all
|
||||
become: true
|
||||
|
||||
@ -35,39 +63,11 @@ index 47eafc0..ca85922 100644
|
||||
- name: save state after initial changes and before other changes
|
||||
set_fact:
|
||||
boolean_before: "{{ selinux_role_boolean.stdout_lines }}"
|
||||
diff --git a/tests/tests_default.yml b/tests/tests_default.yml
|
||||
index a837c73..25bf39d 100644
|
||||
--- a/tests/tests_default.yml
|
||||
+++ b/tests/tests_default.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Ensure that the role runs with default parameters
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
|
||||
roles:
|
||||
diff --git a/tests/tests_default_vars.yml b/tests/tests_default_vars.yml
|
||||
index b6a6b5a..7cd321d 100644
|
||||
--- a/tests/tests_default_vars.yml
|
||||
+++ b/tests/tests_default_vars.yml
|
||||
@@ -1,4 +1,5 @@
|
||||
- name: Ensure that the role declares all paremeters in defaults
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
|
||||
roles:
|
||||
diff --git a/tests/tests_fcontext.yml b/tests/tests_fcontext.yml
|
||||
index 0a411fb..f4a3923 100644
|
||||
index 0a411fb..f6f1bf4 100644
|
||||
--- a/tests/tests_fcontext.yml
|
||||
+++ b/tests/tests_fcontext.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Check if selinux role sets SELinux fcontext mappings
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
become: true
|
||||
|
||||
@@ -13,7 +14,7 @@
|
||||
@@ -13,7 +13,7 @@
|
||||
selinux_fcontexts:
|
||||
- { target: '/tmp/test_dir1(/.*)?', setype: 'user_home_dir_t', ftype: 'd' }
|
||||
|
||||
@ -77,17 +77,10 @@ index 0a411fb..f4a3923 100644
|
||||
set_fact:
|
||||
fcontext_before: "{{ selinux_role_fcontext.stdout }}"
|
||||
diff --git a/tests/tests_login.yml b/tests/tests_login.yml
|
||||
index efa826d..e4f55ca 100644
|
||||
index efa826d..c7ce462 100644
|
||||
--- a/tests/tests_login.yml
|
||||
+++ b/tests/tests_login.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Check if selinux role sets SELinux login mappings
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
become: true
|
||||
|
||||
@@ -18,7 +19,7 @@
|
||||
@@ -18,7 +18,7 @@
|
||||
- { login: 'sar-user', seuser: 'staff_u', serange: 's0-s0:c0.c1023', state: 'present' }
|
||||
|
||||
|
||||
@ -97,17 +90,10 @@ index efa826d..e4f55ca 100644
|
||||
set_fact:
|
||||
login_before: "{{ selinux_role_login.stdout }}"
|
||||
diff --git a/tests/tests_port.yml b/tests/tests_port.yml
|
||||
index 446f79d..03276b5 100644
|
||||
index 446f79d..7bb112e 100644
|
||||
--- a/tests/tests_port.yml
|
||||
+++ b/tests/tests_port.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Check if selinux role sets SELinux port mapping
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
become: true
|
||||
|
||||
@@ -29,7 +30,7 @@
|
||||
@@ -29,7 +29,7 @@
|
||||
selinux_ports:
|
||||
- { ports: '22022', proto: 'tcp', setype: 'ssh_port_t', state: 'present' }
|
||||
|
||||
@ -117,10 +103,10 @@ index 446f79d..03276b5 100644
|
||||
set_fact:
|
||||
port_after: "{{ selinux_role_port.stdout }}"
|
||||
diff --git a/tests/tests_selinux_disabled.yml b/tests/tests_selinux_disabled.yml
|
||||
index afd23e4..d30de2b 100644
|
||||
index afd23e4..706882f 100644
|
||||
--- a/tests/tests_selinux_disabled.yml
|
||||
+++ b/tests/tests_selinux_disabled.yml
|
||||
@@ -18,7 +19,9 @@
|
||||
@@ -18,7 +18,9 @@
|
||||
name:
|
||||
- policycoreutils-python-utils
|
||||
state: present
|
||||
@ -131,7 +117,7 @@ index afd23e4..d30de2b 100644
|
||||
|
||||
- name: Add a Linux System Roles SELinux User
|
||||
user:
|
||||
@@ -67,17 +71,28 @@
|
||||
@@ -67,17 +69,28 @@
|
||||
assert:
|
||||
that: "{{ ansible_selinux.config_mode == 'enforcing' }}"
|
||||
msg: "SELinux config mode should be enforcing instead of {{ ansible_selinux.config_mode }}"
|
||||
|
602
SOURCES/storage-safemode-luks.diff
Normal file
602
SOURCES/storage-safemode-luks.diff
Normal file
@ -0,0 +1,602 @@
|
||||
diff --git a/library/blivet.py b/library/blivet.py
|
||||
index cb48e71..e1903f3 100644
|
||||
--- a/library/blivet.py
|
||||
+++ b/library/blivet.py
|
||||
@@ -167,11 +167,16 @@ class BlivetBase(object):
|
||||
raise NotImplementedError()
|
||||
|
||||
def _manage_one_encryption(self, device):
|
||||
+ global safe_mode
|
||||
ret = device
|
||||
# Make sure to handle adjusting both existing stacks and future stacks.
|
||||
if device == device.raw_device and self._spec_dict['encryption']:
|
||||
# add luks
|
||||
luks_name = "luks-%s" % device._name
|
||||
+ if safe_mode and (device.original_format.type is not None or
|
||||
+ device.original_format.name != get_format(None).name):
|
||||
+ raise BlivetAnsibleError("cannot remove existing formatting on device '%s' in safe mode due to adding encryption" %
|
||||
+ device._name)
|
||||
if not device.format.exists:
|
||||
fmt = device.format
|
||||
else:
|
||||
@@ -196,6 +201,10 @@ class BlivetBase(object):
|
||||
ret = luks_device
|
||||
elif device != device.raw_device and not self._spec_dict['encryption']:
|
||||
# remove luks
|
||||
+ if safe_mode and (device.original_format.type is not None or
|
||||
+ device.original_format.name != get_format(None).name):
|
||||
+ raise BlivetAnsibleError("cannot remove existing formatting on device '%s' in safe mode due to encryption removal" %
|
||||
+ device._name)
|
||||
if not device.format.exists:
|
||||
fmt = device.format
|
||||
else:
|
||||
@@ -823,17 +832,21 @@ class BlivetPool(BlivetBase):
|
||||
|
||||
def manage(self):
|
||||
""" Schedule actions to configure this pool according to the yaml input. """
|
||||
+ global safe_mode
|
||||
# look up the device
|
||||
self._look_up_disks()
|
||||
self._look_up_device()
|
||||
|
||||
# schedule destroy if appropriate, including member type change
|
||||
- if not self.ultimately_present or self._member_management_is_destructive():
|
||||
- if not self.ultimately_present:
|
||||
- self._manage_volumes()
|
||||
+ if not self.ultimately_present:
|
||||
+ self._manage_volumes()
|
||||
self._destroy()
|
||||
- if not self.ultimately_present:
|
||||
- return
|
||||
+ return
|
||||
+ elif self._member_management_is_destructive():
|
||||
+ if safe_mode:
|
||||
+ raise BlivetAnsibleError("cannot remove and recreate existing pool '%s' in safe mode" % self._pool['name'])
|
||||
+ else:
|
||||
+ self._destroy()
|
||||
|
||||
# schedule create if appropriate
|
||||
self._create()
|
||||
diff --git a/tests/create-test-file.yml b/tests/create-test-file.yml
|
||||
new file mode 100644
|
||||
index 0000000..d1091e2
|
||||
--- /dev/null
|
||||
+++ b/tests/create-test-file.yml
|
||||
@@ -0,0 +1,13 @@
|
||||
+# Create a file to be checked that it still exists and no data loss has occured.
|
||||
+# To use:
|
||||
+# - set testfile to a path under the mountpoint being tested
|
||||
+# - include this file (create-test-file.yml) before executing the
|
||||
+# operation to be tested
|
||||
+# - execute the operation that could potentially result in a loss of
|
||||
+# data in the filesystem where testfile is located
|
||||
+# - include verify-data-preservation.yml
|
||||
+
|
||||
+- name: create a file
|
||||
+ file:
|
||||
+ path: "{{ testfile }}"
|
||||
+ state: touch
|
||||
diff --git a/tests/tests_luks.yml b/tests/tests_luks.yml
|
||||
index f93efe5..f733714 100644
|
||||
--- a/tests/tests_luks.yml
|
||||
+++ b/tests/tests_luks.yml
|
||||
@@ -2,8 +2,8 @@
|
||||
- hosts: all
|
||||
become: true
|
||||
vars:
|
||||
- storage_safe_mode: false
|
||||
mount_location: '/opt/test1'
|
||||
+ testfile: "{{ mount_location }}/quux"
|
||||
volume_size: '5g'
|
||||
|
||||
tasks:
|
||||
@@ -64,10 +64,47 @@
|
||||
|
||||
- include_tasks: verify-role-results.yml
|
||||
|
||||
+ - import_tasks: create-test-file.yml
|
||||
+
|
||||
+ - name: Test for correct handling of safe_mode
|
||||
+ block:
|
||||
+ - name: Remove the encryption layer
|
||||
+ include_role:
|
||||
+ name: storage
|
||||
+ vars:
|
||||
+ storage_volumes:
|
||||
+ - name: foo
|
||||
+ type: disk
|
||||
+ disks: "{{ unused_disks }}"
|
||||
+ mount_point: "{{ mount_location }}"
|
||||
+ encryption: false
|
||||
+ encryption_password: 'yabbadabbadoo'
|
||||
+ - name: unreachable task
|
||||
+ fail:
|
||||
+ msg: UNREACH
|
||||
+ rescue:
|
||||
+ - name: Check that we failed in the role
|
||||
+ assert:
|
||||
+ that:
|
||||
+ - ansible_failed_result.msg != 'UNREACH'
|
||||
+ msg: "Role has not failed when it should have"
|
||||
+
|
||||
+ - name: Verify the output of the safe_mode test
|
||||
+ assert:
|
||||
+ that: "blivet_output.failed and
|
||||
+ blivet_output.msg
|
||||
+ |regex_search('cannot remove existing
|
||||
+ formatting.*in safe mode due to encryption removal')
|
||||
+ and not blivet_output.changed"
|
||||
+ msg: "Unexpected behavior w/ existing filesystem in safe mode"
|
||||
+
|
||||
+ - import_tasks: verify-data-preservation.yml
|
||||
+
|
||||
- name: Remove the encryption layer
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_volumes:
|
||||
- name: foo
|
||||
type: disk
|
||||
@@ -78,10 +115,47 @@
|
||||
|
||||
- include_tasks: verify-role-results.yml
|
||||
|
||||
+ - import_tasks: create-test-file.yml
|
||||
+
|
||||
+ - name: Test for correct handling of safe_mode
|
||||
+ block:
|
||||
+ - name: Add encryption to the volume
|
||||
+ include_role:
|
||||
+ name: storage
|
||||
+ vars:
|
||||
+ storage_volumes:
|
||||
+ - name: foo
|
||||
+ type: disk
|
||||
+ disks: "{{ unused_disks }}"
|
||||
+ mount_point: "{{ mount_location }}"
|
||||
+ encryption: true
|
||||
+ encryption_password: 'yabbadabbadoo'
|
||||
+ - name: unreachable task
|
||||
+ fail:
|
||||
+ msg: UNREACH
|
||||
+ rescue:
|
||||
+ - name: Check that we failed in the role
|
||||
+ assert:
|
||||
+ that:
|
||||
+ - ansible_failed_result.msg != 'UNREACH'
|
||||
+ msg: "Role has not failed when it should have"
|
||||
+
|
||||
+ - name: Verify the output of the safe_mode test
|
||||
+ assert:
|
||||
+ that: "blivet_output.failed and
|
||||
+ blivet_output.msg
|
||||
+ |regex_search('cannot remove existing
|
||||
+ formatting.*in safe mode due to adding encryption')
|
||||
+ and not blivet_output.changed"
|
||||
+ msg: "Unexpected behavior w/ existing filesystem in safe mode"
|
||||
+
|
||||
+ - import_tasks: verify-data-preservation.yml
|
||||
+
|
||||
- name: Add encryption to the volume
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_volumes:
|
||||
- name: foo
|
||||
type: disk
|
||||
@@ -102,6 +176,7 @@
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_pools:
|
||||
- name: foo
|
||||
type: partition
|
||||
@@ -135,6 +210,7 @@
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_pools:
|
||||
- name: foo
|
||||
type: partition
|
||||
@@ -149,10 +225,51 @@
|
||||
|
||||
- include_tasks: verify-role-results.yml
|
||||
|
||||
+ - import_tasks: create-test-file.yml
|
||||
+
|
||||
+ - name: Test for correct handling of safe_mode
|
||||
+ block:
|
||||
+ - name: Remove the encryption layer
|
||||
+ include_role:
|
||||
+ name: storage
|
||||
+ vars:
|
||||
+ storage_pools:
|
||||
+ - name: foo
|
||||
+ type: partition
|
||||
+ disks: "{{ unused_disks }}"
|
||||
+ volumes:
|
||||
+ - name: test1
|
||||
+ type: partition
|
||||
+ mount_point: "{{ mount_location }}"
|
||||
+ size: 4g
|
||||
+ encryption: false
|
||||
+ encryption_password: 'yabbadabbadoo'
|
||||
+ - name: unreachable task
|
||||
+ fail:
|
||||
+ msg: UNREACH
|
||||
+ rescue:
|
||||
+ - name: Check that we failed in the role
|
||||
+ assert:
|
||||
+ that:
|
||||
+ - ansible_failed_result.msg != 'UNREACH'
|
||||
+ msg: "Role has not failed when it should have"
|
||||
+
|
||||
+ - name: Verify the output of the safe_mode test
|
||||
+ assert:
|
||||
+ that: "blivet_output.failed and
|
||||
+ blivet_output.msg
|
||||
+ |regex_search('cannot remove existing
|
||||
+ formatting.*in safe mode due to encryption removal')
|
||||
+ and not blivet_output.changed"
|
||||
+ msg: "Unexpected behavior w/ existing filesystem in safe mode"
|
||||
+
|
||||
+ - import_tasks: verify-data-preservation.yml
|
||||
+
|
||||
- name: Remove the encryption layer
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_pools:
|
||||
- name: foo
|
||||
type: partition
|
||||
@@ -167,6 +284,48 @@
|
||||
|
||||
- include_tasks: verify-role-results.yml
|
||||
|
||||
+ - import_tasks: create-test-file.yml
|
||||
+
|
||||
+ - name: Test for correct handling of safe_mode
|
||||
+ block:
|
||||
+ - name: Add encryption to the volume
|
||||
+ include_role:
|
||||
+ name: storage
|
||||
+ vars:
|
||||
+ storage_pools:
|
||||
+ - name: foo
|
||||
+ type: partition
|
||||
+ disks: "{{ unused_disks }}"
|
||||
+ volumes:
|
||||
+ - name: test1
|
||||
+ type: partition
|
||||
+ mount_point: "{{ mount_location }}"
|
||||
+ size: 4g
|
||||
+ encryption: true
|
||||
+ encryption_password: 'yabbadabbadoo'
|
||||
+
|
||||
+ - name: unreachable task
|
||||
+ fail:
|
||||
+ msg: UNREACH
|
||||
+
|
||||
+ rescue:
|
||||
+ - name: Check that we failed in the role
|
||||
+ assert:
|
||||
+ that:
|
||||
+ - ansible_failed_result.msg != 'UNREACH'
|
||||
+ msg: "Role has not failed when it should have"
|
||||
+
|
||||
+ - name: Verify the output of the safe_mode test
|
||||
+ assert:
|
||||
+ that: "blivet_output.failed and
|
||||
+ blivet_output.msg
|
||||
+ |regex_search('cannot remove existing
|
||||
+ formatting.*in safe mode due to adding encryption')
|
||||
+ and not blivet_output.changed"
|
||||
+ msg: "Unexpected behavior w/ existing volume in safe mode"
|
||||
+
|
||||
+ - import_tasks: verify-data-preservation.yml
|
||||
+
|
||||
- name: Test key file handling
|
||||
block:
|
||||
- name: Create a key file
|
||||
@@ -186,6 +345,7 @@
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_pools:
|
||||
- name: foo
|
||||
type: partition
|
||||
@@ -216,6 +376,7 @@
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_pools:
|
||||
- name: foo
|
||||
type: lvm
|
||||
@@ -248,6 +409,7 @@
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_pools:
|
||||
- name: foo
|
||||
type: lvm
|
||||
@@ -264,10 +426,52 @@
|
||||
|
||||
- include_tasks: verify-role-results.yml
|
||||
|
||||
+ - import_tasks: create-test-file.yml
|
||||
+
|
||||
+ - name: Test for correct handling of safe_mode
|
||||
+ block:
|
||||
+ - name: Remove the encryption layer
|
||||
+ include_role:
|
||||
+ name: storage
|
||||
+ vars:
|
||||
+ storage_pools:
|
||||
+ - name: foo
|
||||
+ type: lvm
|
||||
+ disks: "{{ unused_disks }}"
|
||||
+ volumes:
|
||||
+ - name: test1
|
||||
+ mount_point: "{{ mount_location }}"
|
||||
+ size: 4g
|
||||
+ encryption: false
|
||||
+ encryption_password: 'yabbadabbadoo'
|
||||
+
|
||||
+ - name: unreachable task
|
||||
+ fail:
|
||||
+ msg: UNREACH
|
||||
+
|
||||
+ rescue:
|
||||
+ - name: Check that we failed in the role
|
||||
+ assert:
|
||||
+ that:
|
||||
+ - ansible_failed_result.msg != 'UNREACH'
|
||||
+ msg: "Role has not failed when it should have"
|
||||
+
|
||||
+ - name: Verify the output of the safe_mode test
|
||||
+ assert:
|
||||
+ that: "blivet_output.failed and
|
||||
+ blivet_output.msg
|
||||
+ |regex_search('cannot remove existing
|
||||
+ formatting.*in safe mode due to encryption removal')
|
||||
+ and not blivet_output.changed"
|
||||
+ msg: "Unexpected behavior w/ existing volume in safe mode"
|
||||
+
|
||||
+ - import_tasks: verify-data-preservation.yml
|
||||
+
|
||||
- name: Remove the encryption layer
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_pools:
|
||||
- name: foo
|
||||
type: lvm
|
||||
@@ -281,10 +485,52 @@
|
||||
|
||||
- include_tasks: verify-role-results.yml
|
||||
|
||||
+ - import_tasks: create-test-file.yml
|
||||
+
|
||||
+ - name: Test for correct handling of safe_mode
|
||||
+ block:
|
||||
+ - name: Add encryption to the volume
|
||||
+ include_role:
|
||||
+ name: storage
|
||||
+ vars:
|
||||
+ storage_pools:
|
||||
+ - name: foo
|
||||
+ type: lvm
|
||||
+ disks: "{{ unused_disks }}"
|
||||
+ volumes:
|
||||
+ - name: test1
|
||||
+ mount_point: "{{ mount_location }}"
|
||||
+ size: 4g
|
||||
+ encryption: true
|
||||
+ encryption_password: 'yabbadabbadoo'
|
||||
+
|
||||
+ - name: unreachable task
|
||||
+ fail:
|
||||
+ msg: UNREACH
|
||||
+
|
||||
+ rescue:
|
||||
+ - name: Check that we failed in the role
|
||||
+ assert:
|
||||
+ that:
|
||||
+ - ansible_failed_result.msg != 'UNREACH'
|
||||
+ msg: "Role has not failed when it should have"
|
||||
+
|
||||
+ - name: Verify the output of the safe_mode test
|
||||
+ assert:
|
||||
+ that: "blivet_output.failed and
|
||||
+ blivet_output.msg
|
||||
+ |regex_search('cannot remove existing
|
||||
+ formatting.*in safe mode due to adding encryption')
|
||||
+ and not blivet_output.changed"
|
||||
+ msg: "Unexpected behavior w/ existing volume in safe mode"
|
||||
+
|
||||
+ - import_tasks: verify-data-preservation.yml
|
||||
+
|
||||
- name: Add encryption to the volume
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_pools:
|
||||
- name: foo
|
||||
type: lvm
|
||||
diff --git a/tests/tests_luks_pool.yml b/tests/tests_luks_pool.yml
|
||||
index b20b806..f44916f 100644
|
||||
--- a/tests/tests_luks_pool.yml
|
||||
+++ b/tests/tests_luks_pool.yml
|
||||
@@ -2,9 +2,10 @@
|
||||
- hosts: all
|
||||
become: true
|
||||
vars:
|
||||
- storage_safe_mode: false
|
||||
mount_location: '/opt/test1'
|
||||
mount_location_2: '/opt/test2'
|
||||
+ testfile: "{{ mount_location }}/quux"
|
||||
+ testfile_location_2: "{{ mount_location_2 }}/quux"
|
||||
volume_size: '5g'
|
||||
|
||||
tasks:
|
||||
@@ -92,10 +93,50 @@
|
||||
state: absent
|
||||
changed_when: false
|
||||
|
||||
+ - import_tasks: create-test-file.yml
|
||||
+
|
||||
+ - name: Test for correct handling of safe_mode
|
||||
+ block:
|
||||
+ - name: Remove the encryption layer
|
||||
+ include_role:
|
||||
+ name: storage
|
||||
+ vars:
|
||||
+ storage_pools:
|
||||
+ - name: foo
|
||||
+ type: lvm
|
||||
+ disks: "{{ unused_disks }}"
|
||||
+ encryption: false
|
||||
+ encryption_password: 'yabbadabbadoo'
|
||||
+ volumes:
|
||||
+ - name: test1
|
||||
+ mount_point: "{{ mount_location }}"
|
||||
+ size: 4g
|
||||
+ - name: unreachable task
|
||||
+ fail:
|
||||
+ msg: UNREACH
|
||||
+ rescue:
|
||||
+ - name: Check that we failed in the role
|
||||
+ assert:
|
||||
+ that:
|
||||
+ - ansible_failed_result.msg != 'UNREACH'
|
||||
+ msg: "Role has not failed when it should have"
|
||||
+
|
||||
+ - name: Verify the output of the safe_mode test
|
||||
+ assert:
|
||||
+ that: "blivet_output.failed and
|
||||
+ blivet_output.msg
|
||||
+ |regex_search('cannot remove and recreate existing
|
||||
+ pool.*in safe mode')
|
||||
+ and not blivet_output.changed"
|
||||
+ msg: "Unexpected behavior w/ existing pool in safe mode"
|
||||
+
|
||||
+ - import_tasks: verify-data-preservation.yml
|
||||
+
|
||||
- name: Remove the encryption layer
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_pools:
|
||||
- name: foo
|
||||
type: lvm
|
||||
@@ -109,10 +150,53 @@
|
||||
|
||||
- include_tasks: verify-role-results.yml
|
||||
|
||||
- - name: Add encryption to the volume
|
||||
+ - import_tasks: create-test-file.yml
|
||||
+
|
||||
+ - name: Test for correct handling of safe_mode
|
||||
+ block:
|
||||
+ - name: Add encryption to the pool
|
||||
+ include_role:
|
||||
+ name: storage
|
||||
+ vars:
|
||||
+ storage_pools:
|
||||
+ - name: foo
|
||||
+ type: lvm
|
||||
+ disks: "{{ unused_disks }}"
|
||||
+ encryption: true
|
||||
+ encryption_password: 'yabbadabbadoo'
|
||||
+ encryption_luks_version: luks1
|
||||
+ encryption_key_size: 512
|
||||
+ encryption_cipher: 'serpent-xts-plain64'
|
||||
+ volumes:
|
||||
+ - name: test1
|
||||
+ mount_point: "{{ mount_location }}"
|
||||
+ size: 4g
|
||||
+ - name: unreachable task
|
||||
+ fail:
|
||||
+ msg: UNREACH
|
||||
+ rescue:
|
||||
+ - name: Check that we failed in the role
|
||||
+ assert:
|
||||
+ that:
|
||||
+ - ansible_failed_result.msg != 'UNREACH'
|
||||
+ msg: "Role has not failed when it should have"
|
||||
+
|
||||
+ - name: Verify the output of the safe_mode test
|
||||
+ assert:
|
||||
+ that: "blivet_output.failed and
|
||||
+ blivet_output.msg
|
||||
+ |regex_search('cannot remove and recreate existing
|
||||
+ pool.*in safe mode')
|
||||
+ and not blivet_output.changed"
|
||||
+ msg: "Unexpected behavior w/ existing pool in safe mode"
|
||||
+
|
||||
+ - import_tasks: verify-data-preservation.yml
|
||||
+
|
||||
+ - name: Add encryption to the pool
|
||||
include_role:
|
||||
name: storage
|
||||
vars:
|
||||
+ storage_safe_mode: false
|
||||
storage_pools:
|
||||
- name: foo
|
||||
type: lvm
|
||||
@@ -129,6 +213,8 @@
|
||||
|
||||
- include_tasks: verify-role-results.yml
|
||||
|
||||
+ - import_tasks: create-test-file.yml
|
||||
+
|
||||
- name: Change the mountpoint, leaving encryption in place
|
||||
include_role:
|
||||
name: storage
|
||||
@@ -144,6 +230,10 @@
|
||||
mount_point: "{{ mount_location_2 }}"
|
||||
size: 4g
|
||||
|
||||
+ - import_tasks: verify-data-preservation.yml
|
||||
+ vars:
|
||||
+ testfile: "{{ testfile_location_2 }}"
|
||||
+
|
||||
- include_tasks: verify-role-results.yml
|
||||
|
||||
- name: Clean up
|
||||
diff --git a/tests/verify-data-preservation.yml b/tests/verify-data-preservation.yml
|
||||
new file mode 100644
|
||||
index 0000000..eed790f
|
||||
--- /dev/null
|
||||
+++ b/tests/verify-data-preservation.yml
|
||||
@@ -0,0 +1,19 @@
|
||||
+# Verify that a file still exists and no data loss has occured.
|
||||
+# To use:
|
||||
+# - set testfile to a path under the mountpoint being tested
|
||||
+# - include create-test-file.yml before executing the operation to be
|
||||
+# tested
|
||||
+# - execute the operation that could potentially result in a loss of
|
||||
+# data in the filesystem where testfile is located
|
||||
+# - include this file (verify-data-preservation.yml)
|
||||
+
|
||||
+- name: stat the file
|
||||
+ stat:
|
||||
+ path: "{{ testfile }}"
|
||||
+ register: stat_r
|
||||
+
|
||||
+- name: assert file presence
|
||||
+ assert:
|
||||
+ that:
|
||||
+ stat_r.stat.isreg is defined and stat_r.stat.isreg
|
||||
+ msg: "data lost!"
|
File diff suppressed because it is too large
Load Diff
@ -37,10 +37,7 @@ diff --git a/tests/tests_default.yml b/tests/tests_default.yml
|
||||
index 856ebe5..fb298c9 100644
|
||||
--- a/tests/tests_default.yml
|
||||
+++ b/tests/tests_default.yml
|
||||
@@ -1,6 +1,17 @@
|
||||
|
||||
- name: Ensure that the role runs with default parameters
|
||||
+ tags: tests::tier1
|
||||
@@ -3,4 +4,14 @@
|
||||
hosts: all
|
||||
|
||||
roles:
|
||||
@ -48,24 +45,13 @@ index 856ebe5..fb298c9 100644
|
||||
+
|
||||
+ pre_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
+ post_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: restore_services_state.yml
|
||||
diff --git a/tests/tests_default_vars.yml b/tests/tests_default_vars.yml
|
||||
index 366a9f5..df989a5 100644
|
||||
--- a/tests/tests_default_vars.yml
|
||||
+++ b/tests/tests_default_vars.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
- name: Ensure that the role declares all parameters in defaults
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
|
||||
tasks:
|
||||
diff --git a/tests/tests_default_wrapper.yml b/tests/tests_default_wrapper.yml
|
||||
index a768f4c..b0c0ab3 100644
|
||||
--- a/tests/tests_default_wrapper.yml
|
||||
@ -74,7 +60,7 @@ index a768f4c..b0c0ab3 100644
|
||||
---
|
||||
- name: Create static inventory from hostvars
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+# - 'tests::tier1'
|
||||
+ - 'tests::slow'
|
||||
hosts: all
|
||||
tasks:
|
||||
@ -84,13 +70,13 @@ index a768f4c..b0c0ab3 100644
|
||||
|
||||
- name: Run tests_default.yml normally
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+# - 'tests::tier1'
|
||||
+ - 'tests::slow'
|
||||
import_playbook: tests_default.yml
|
||||
|
||||
- name: Run tests_default.yml in check_mode
|
||||
+ tags:
|
||||
+ - 'tests::tier1'
|
||||
+# - 'tests::tier1'
|
||||
+ - 'tests::slow'
|
||||
hosts: all
|
||||
tasks:
|
||||
@ -99,20 +85,13 @@ diff --git a/tests/tests_ntp.yml b/tests/tests_ntp.yml
|
||||
index e4b1b5e..446f1dc 100644
|
||||
--- a/tests/tests_ntp.yml
|
||||
+++ b/tests/tests_ntp.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Configure time synchronization with NTP servers
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
vars:
|
||||
timesync_ntp_servers:
|
||||
@@ -18,6 +19,11 @@
|
||||
roles:
|
||||
- linux-system-roles.timesync
|
||||
|
||||
+ pre_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
tasks:
|
||||
@ -125,25 +104,18 @@ index e4b1b5e..446f1dc 100644
|
||||
+
|
||||
+ post_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: restore_services_state.yml
|
||||
diff --git a/tests/tests_ntp_provider1.yml b/tests/tests_ntp_provider1.yml
|
||||
index 08ecab9..9fe0db3 100644
|
||||
--- a/tests/tests_ntp_provider1.yml
|
||||
+++ b/tests/tests_ntp_provider1.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Configure NTP with default provider
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
vars:
|
||||
timesync_ntp_servers:
|
||||
@@ -8,6 +9,10 @@
|
||||
- linux-system-roles.timesync
|
||||
|
||||
pre_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
- name: Remove NTP providers
|
||||
@ -155,25 +127,18 @@ index 08ecab9..9fe0db3 100644
|
||||
- "'172.16.123.1' in sources.stdout"
|
||||
+
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: restore_services_state.yml
|
||||
diff --git a/tests/tests_ntp_provider2.yml b/tests/tests_ntp_provider2.yml
|
||||
index 5476ae4..e0d5c96 100644
|
||||
--- a/tests/tests_ntp_provider2.yml
|
||||
+++ b/tests/tests_ntp_provider2.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Configure NTP with chrony as current provider
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
vars:
|
||||
timesync_ntp_servers:
|
||||
@@ -8,6 +9,10 @@
|
||||
- linux-system-roles.timesync
|
||||
|
||||
pre_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
- name: Remove ntp
|
||||
@ -185,25 +150,18 @@ index 5476ae4..e0d5c96 100644
|
||||
shell: chronyc -n tracking
|
||||
+
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: restore_services_state.yml
|
||||
diff --git a/tests/tests_ntp_provider3.yml b/tests/tests_ntp_provider3.yml
|
||||
index 44ca101..d440a64 100644
|
||||
--- a/tests/tests_ntp_provider3.yml
|
||||
+++ b/tests/tests_ntp_provider3.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Configure NTP with ntp as current provider
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
vars:
|
||||
timesync_ntp_servers:
|
||||
@@ -8,6 +9,10 @@
|
||||
- linux-system-roles.timesync
|
||||
|
||||
pre_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
- name: Remove chrony
|
||||
@ -221,19 +179,12 @@ diff --git a/tests/tests_ntp_provider4.yml b/tests/tests_ntp_provider4.yml
|
||||
index 8b452b8..8bccba0 100644
|
||||
--- a/tests/tests_ntp_provider4.yml
|
||||
+++ b/tests/tests_ntp_provider4.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Configure NTP with chrony as specified provider
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
vars:
|
||||
timesync_ntp_servers:
|
||||
@@ -9,6 +10,10 @@
|
||||
- linux-system-roles.timesync
|
||||
|
||||
pre_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
- name: Install chrony
|
||||
@ -245,25 +196,18 @@ index 8b452b8..8bccba0 100644
|
||||
shell: chronyc -n tracking
|
||||
+
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: restore_services_state.yml
|
||||
diff --git a/tests/tests_ntp_provider5.yml b/tests/tests_ntp_provider5.yml
|
||||
index 1740164..98a054f 100644
|
||||
--- a/tests/tests_ntp_provider5.yml
|
||||
+++ b/tests/tests_ntp_provider5.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Configure NTP with ntp as specified provider
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
vars:
|
||||
timesync_ntp_servers:
|
||||
@@ -9,6 +10,10 @@
|
||||
- linux-system-roles.timesync
|
||||
|
||||
pre_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
- name: Install ntp
|
||||
@ -275,24 +219,18 @@ index 1740164..98a054f 100644
|
||||
shell: ntpq -c rv | grep 'associd=0'
|
||||
+
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: restore_services_state.yml
|
||||
diff --git a/tests/tests_ntp_provider6.yml b/tests/tests_ntp_provider6.yml
|
||||
index 21a2039..fb41824 100644
|
||||
--- a/tests/tests_ntp_provider6.yml
|
||||
+++ b/tests/tests_ntp_provider6.yml
|
||||
@@ -1,11 +1,16 @@
|
||||
|
||||
- name: Configure NTP with OS release non-default provider and then change it to the default provider
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
vars:
|
||||
is_ntp_default: "ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_version is version('7.0', '<')"
|
||||
@@ -6,6 +7,10 @@
|
||||
both_avail: true
|
||||
|
||||
tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
- name: Check for availability of both NTP providers
|
||||
@ -304,26 +242,19 @@ index 21a2039..fb41824 100644
|
||||
- not is_ntp_default
|
||||
+
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: restore_services_state.yml
|
||||
diff --git a/tests/tests_ntp_ptp.yml b/tests/tests_ntp_ptp.yml
|
||||
index cab706f..7f4cdfc 100644
|
||||
--- a/tests/tests_ntp_ptp.yml
|
||||
+++ b/tests/tests_ntp_ptp.yml
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Configure time synchronization with NTP servers and PTP domains
|
||||
+ tags: tests::tier1
|
||||
hosts: all
|
||||
vars:
|
||||
timesync_ntp_servers:
|
||||
@@ -22,6 +23,11 @@
|
||||
roles:
|
||||
- linux-system-roles.timesync
|
||||
|
||||
+ pre_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
tasks:
|
||||
@ -336,7 +267,7 @@ index cab706f..7f4cdfc 100644
|
||||
+
|
||||
+ post_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: restore_services_state.yml
|
||||
diff --git a/tests/tests_ptp_multi.yml b/tests/tests_ptp_multi.yml
|
||||
index d52d439..936e467 100644
|
||||
@ -345,7 +276,7 @@ index d52d439..936e467 100644
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Configure time synchronization with multiple PTP domains
|
||||
+ tags: [ 'tests::tier1', 'tests::expfail' ]
|
||||
+ tags: tests::expfail
|
||||
hosts: all
|
||||
vars:
|
||||
timesync_ptp_domains:
|
||||
@ -355,7 +286,7 @@ index d52d439..936e467 100644
|
||||
|
||||
+ pre_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
tasks:
|
||||
@ -368,7 +299,7 @@ index d52d439..936e467 100644
|
||||
+
|
||||
+ post_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: restore_services_state.yml
|
||||
diff --git a/tests/tests_ptp_single.yml b/tests/tests_ptp_single.yml
|
||||
index 74da310..36d141e 100644
|
||||
@ -377,7 +308,7 @@ index 74da310..36d141e 100644
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
- name: Configure time synchronization with single PTP domain
|
||||
+ tags: [ 'tests::tier1', 'tests::expfail' ]
|
||||
+ tags: tests::expfail
|
||||
hosts: all
|
||||
vars:
|
||||
timesync_ptp_domains:
|
||||
@ -387,7 +318,7 @@ index 74da310..36d141e 100644
|
||||
|
||||
+ pre_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: get_services_state.yml
|
||||
+
|
||||
tasks:
|
||||
@ -400,5 +331,5 @@ index 74da310..36d141e 100644
|
||||
+
|
||||
+ post_tasks:
|
||||
+ - name: Import tasks
|
||||
+ tags: tests::tier1::cleanup
|
||||
+# tags: tests::tier1::cleanup
|
||||
+ import_tasks: restore_services_state.yml
|
||||
|
@ -5,7 +5,7 @@ Name: linux-system-roles
|
||||
%endif
|
||||
Summary: Set of interfaces for unified system management
|
||||
Version: 1.0
|
||||
Release: 10%{?dist}
|
||||
Release: 20%{?dist}
|
||||
|
||||
#Group: Development/Libraries
|
||||
License: GPLv3+ and MIT and BSD
|
||||
@ -42,22 +42,57 @@ License: GPLv3+ and MIT and BSD
|
||||
%global rolename3 timesync
|
||||
#%%deftag 3 1.0.0
|
||||
|
||||
%defcommit 5 d5891d43a2ddc8cb6278958a6ad19524dcbf72ff
|
||||
%defcommit 5 bf4501bb8770d3ef761e1684011c905f99a9752f
|
||||
%global rolename5 network
|
||||
#%%deftag 5 1.0.0
|
||||
|
||||
%defcommit 6 1594e2527c4eca0fa2876d4cc3ff6395ed280b8d
|
||||
%defcommit 6 81f30ab336f4ecc61b4a30ffcb080e17fd35de2e
|
||||
%global rolename6 storage
|
||||
#%%deftag 6 1.0.2
|
||||
|
||||
%defcommit 7 7f94b49688902eb507e0ebeda1fbf08621bc3c6b
|
||||
%global rolename7 metrics
|
||||
#%%deftag 7 0.1.0
|
||||
|
||||
%defcommit 8 cfa70b6b5910b3198aba2679f8fc36aad45ca45a
|
||||
%global rolename8 tlog
|
||||
#%%deftag 8 0.2.0
|
||||
|
||||
%defcommit 9 901a73a4285469ef50a6cc37135ae55ce9d2e41b
|
||||
%global rolename9 kernel_settings
|
||||
#%%deftag 9 0.2.0
|
||||
|
||||
%defcommit 10 fe3f658e72b2883d2a1460d453105c7a53dd70e8
|
||||
%global rolename10 logging
|
||||
#%%deftag 10 0.2.0
|
||||
|
||||
%defcommit 11 4b6cfca4dd24e53a4bc4e07635601d7c104346c1
|
||||
%global rolename11 nbde_server
|
||||
#%%deftag 11 0.1.0
|
||||
|
||||
%defcommit 12 6306defad146d8274b04f438a04e17e44672f1a6
|
||||
%global rolename12 nbde_client
|
||||
#%%deftag 12 0.1.0
|
||||
|
||||
%defcommit 13 fedef6e7844bb623bb54695a602137e332f5509f
|
||||
%global rolename13 certificate
|
||||
#%%deftag 13 0.1.0
|
||||
|
||||
Source: https://github.com/linux-system-roles/%{rolename0}/archive/%{id0}.tar.gz#/%{rolename0}-%{shortid0}.tar.gz
|
||||
Source1: https://github.com/linux-system-roles/%{rolename1}/archive/%{id1}.tar.gz#/%{rolename1}-%{shortid1}.tar.gz
|
||||
Source2: https://github.com/linux-system-roles/%{rolename2}/archive/%{id2}.tar.gz#/%{rolename2}-%{shortid2}.tar.gz
|
||||
Source3: https://github.com/linux-system-roles/%{rolename3}/archive/%{id3}.tar.gz#/%{rolename3}-%{shortid3}.tar.gz
|
||||
Source5: https://github.com/linux-system-roles/%{rolename5}/archive/%{id5}.tar.gz#/%{rolename5}-%{shortid5}.tar.gz
|
||||
Source6: https://github.com/linux-system-roles/%{rolename6}/archive/%{id6}.tar.gz#/%{rolename6}-%{shortid6}.tar.gz
|
||||
Source7: https://github.com/linux-system-roles/%{rolename7}/archive/%{id7}.tar.gz#/%{rolename7}-%{shortid7}.tar.gz
|
||||
Source8: https://github.com/linux-system-roles/%{rolename8}/archive/%{id8}.tar.gz#/%{rolename8}-%{shortid8}.tar.gz
|
||||
Source9: https://github.com/linux-system-roles/%{rolename9}/archive/%{id9}.tar.gz#/%{rolename9}-%{shortid9}.tar.gz
|
||||
Source10: https://github.com/linux-system-roles/%{rolename10}/archive/%{id10}.tar.gz#/%{rolename10}-%{shortid10}.tar.gz
|
||||
Source11: https://github.com/linux-system-roles/%{rolename11}/archive/%{id11}.tar.gz#/%{rolename11}-%{shortid11}.tar.gz
|
||||
Source12: https://github.com/linux-system-roles/%{rolename12}/archive/%{id12}.tar.gz#/%{rolename12}-%{shortid12}.tar.gz
|
||||
Source13: https://github.com/linux-system-roles/%{rolename13}/archive/%{id13}.tar.gz#/%{rolename13}-%{shortid13}.tar.gz
|
||||
|
||||
Source8: md2html.sh
|
||||
Source999: md2html.sh
|
||||
|
||||
%if "%{roleprefix}" != "linux-system-roles."
|
||||
Patch1: rhel-system-roles-%{rolename1}-prefix.diff
|
||||
@ -65,12 +100,15 @@ Patch2: rhel-system-roles-%{rolename2}-prefix.diff
|
||||
Patch3: rhel-system-roles-%{rolename3}-prefix.diff
|
||||
Patch5: rhel-system-roles-%{rolename5}-prefix.diff
|
||||
Patch6: rhel-system-roles-%{rolename6}-prefix.diff
|
||||
# for some roles, the prefix change can be scripted - see below
|
||||
%endif
|
||||
|
||||
Patch11: rhel-system-roles-postfix-pr5.diff
|
||||
Patch12: postfix-meta-el8.diff
|
||||
Patch101: rhel-system-roles-kdump-pr22.diff
|
||||
|
||||
Patch102: kdump-tier1-tags.diff
|
||||
Patch103: kdump-meta-el8.diff
|
||||
|
||||
Patch21: selinux-tier1-tags.diff
|
||||
|
||||
@ -78,9 +116,8 @@ Patch31: timesync-tier1-tags.diff
|
||||
|
||||
Patch52: network-permissions.diff
|
||||
Patch53: network-tier1-tags.diff
|
||||
Patch54: rhel-system-roles-network-pr121.diff
|
||||
|
||||
Patch61: storage-safemode.diff
|
||||
Patch61: storage-safemode-luks.diff
|
||||
|
||||
Url: https://github.com/linux-system-roles/
|
||||
BuildArch: noarch
|
||||
@ -108,16 +145,18 @@ of Fedora, Red Hat Enterprise Linux & CentOS.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -qc -a1 -a2 -a3 -a5 -a6
|
||||
%setup -qc -a1 -a2 -a3 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13
|
||||
cd %{rolename0}-%{id0}
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
cd ..
|
||||
cd %{rolename1}-%{id1}
|
||||
%if "%{roleprefix}" != "linux-system-roles."
|
||||
%patch1 -p1
|
||||
%endif
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
cd ..
|
||||
cd %{rolename2}-%{id2}
|
||||
%if "%{roleprefix}" != "linux-system-roles."
|
||||
@ -137,7 +176,6 @@ cd %{rolename5}-%{id5}
|
||||
%endif
|
||||
%patch52 -p1
|
||||
%patch53 -p1
|
||||
%patch54 -p1
|
||||
cd ..
|
||||
cd %{rolename6}-%{id6}
|
||||
%if "%{roleprefix}" != "linux-system-roles."
|
||||
@ -146,14 +184,35 @@ cd %{rolename6}-%{id6}
|
||||
%patch61 -p1
|
||||
cd ..
|
||||
|
||||
# for some roles, the prefix change can be scripted - see below
|
||||
%if "%{roleprefix}" != "linux-system-roles."
|
||||
for rolename_id in %{rolename7}-%{id7} %{rolename8}-%{id8} %{rolename9}-%{id9} \
|
||||
%{rolename10}-%{id10} %{rolename11}-%{id11} %{rolename12}-%{id12} \
|
||||
%{rolename13}-%{id13}; do
|
||||
# assumes rolename has no dash in it
|
||||
# note that we have to use double %%
|
||||
# in order for a single % to be passed to bash
|
||||
rolename=${rolename_id%%-*}
|
||||
find $rolename_id -type f -exec \
|
||||
sed "s/linux-system-roles[.]${rolename}\\>/%{roleprefix}${rolename}/g" -i {} \;
|
||||
done
|
||||
%endif
|
||||
|
||||
%build
|
||||
sh %{SOURCE8} \
|
||||
sh %{SOURCE999} \
|
||||
%{rolename0}-%{id0}/README.md \
|
||||
%{rolename1}-%{id1}/README.md \
|
||||
%{rolename2}-%{id2}/README.md \
|
||||
%{rolename3}-%{id3}/README.md \
|
||||
%{rolename5}-%{id5}/README.md \
|
||||
%{rolename6}-%{id6}/README.md
|
||||
%{rolename6}-%{id6}/README.md \
|
||||
%{rolename7}-%{id7}/README.md \
|
||||
%{rolename8}-%{id8}/README.md \
|
||||
%{rolename9}-%{id9}/README.md \
|
||||
%{rolename10}-%{id10}/README.md \
|
||||
%{rolename11}-%{id11}/README.md \
|
||||
%{rolename12}-%{id12}/README.md \
|
||||
%{rolename13}-%{id13}/README.md
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles
|
||||
@ -164,6 +223,13 @@ cp -pR %{rolename2}-%{id2} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolep
|
||||
cp -pR %{rolename3}-%{id3} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename3}
|
||||
cp -pR %{rolename5}-%{id5} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename5}
|
||||
cp -pR %{rolename6}-%{id6} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename6}
|
||||
cp -pR %{rolename7}-%{id7} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename7}
|
||||
cp -pR %{rolename8}-%{id8} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename8}
|
||||
cp -pR %{rolename9}-%{id9} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename9}
|
||||
cp -pR %{rolename10}-%{id10} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename10}
|
||||
cp -pR %{rolename11}-%{id11} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename11}
|
||||
cp -pR %{rolename12}-%{id12} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename12}
|
||||
cp -pR %{rolename13}-%{id13} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}%{rolename13}
|
||||
|
||||
%if 0%{?rolealtprefix:1}
|
||||
ln -s %{roleprefix}%{rolename0} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename0}
|
||||
@ -172,6 +238,13 @@ ln -s %{roleprefix}%{rolename2} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{
|
||||
ln -s %{roleprefix}%{rolename3} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename3}
|
||||
ln -s %{roleprefix}%{rolename5} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename5}
|
||||
ln -s %{roleprefix}%{rolename6} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename6}
|
||||
ln -s %{roleprefix}%{rolename7} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename7}
|
||||
ln -s %{roleprefix}%{rolename8} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename8}
|
||||
ln -s %{roleprefix}%{rolename9} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename9}
|
||||
ln -s %{roleprefix}%{rolename10} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename10}
|
||||
ln -s %{roleprefix}%{rolename11} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename11}
|
||||
ln -s %{roleprefix}%{rolename12} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename12}
|
||||
ln -s %{roleprefix}%{rolename13} $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}%{rolename13}
|
||||
%endif
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/kdump
|
||||
@ -180,6 +253,13 @@ mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/selinux
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/timesync
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/network
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/storage
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/metrics
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/tlog
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/kernel_settings
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/logging
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/nbde_server
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/nbde_client
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/certificate
|
||||
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/README.md \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kdump/README.html \
|
||||
@ -211,37 +291,44 @@ cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/README.md \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/README.html \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/LICENSE \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/bond-with-vlan.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bond-with-vlan-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/bridge-with-vlan.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bridge-with-vlan-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth-simple-auto.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth-simple-auto-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth-with-vlan.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth-with-vlan-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/bond_with_vlan.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bond_with_vlan-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/bridge_with_vlan.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bridge_with_vlan-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth_simple_auto.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth_simple_auto-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth_with_vlan.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth_with_vlan-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/infiniband.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-infiniband-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/macvlan.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-macvlan-playbook.yml
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/remove-profile.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-remove-profile-playbook.yml
|
||||
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/remove-profile.yml
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/down-profile.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-down-profile-playbook.yml
|
||||
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/down-profile.yml
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/remove_profile.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-remove_profile-playbook.yml
|
||||
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/remove_profile.yml
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/down_profile.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-down_profile-playbook.yml
|
||||
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/down_profile.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/inventory \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-inventory
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/ethtool-features.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-ethtool-features-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/ethtool-features-default.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-ethtool-features-default-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/ethtool_features.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-ethtool_features-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/ethtool_features_default.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-ethtool_features_default-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/bond_simple.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-bond_simple-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/eth_with_802_1x.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-eth_with_802_1x-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/wireless_wpa_psk.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-wireless_wpa_psk-playbook.yml
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/remove+down_profile.yml \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/network/example-remove+down_profile-playbook.yml
|
||||
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}storage/README.md \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}storage/README.html \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}storage/LICENSE \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/storage
|
||||
|
||||
|
||||
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}*/semaphore
|
||||
rm -r $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}*/molecule
|
||||
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}*/.travis.yml
|
||||
@ -252,6 +339,43 @@ rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/tests/.gitignor
|
||||
rm $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples/roles
|
||||
rmdir $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples
|
||||
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}metrics/README.md \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}metrics/README.html \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}metrics/LICENSE \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/metrics
|
||||
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}tlog/README.md \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}tlog/README.html \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}tlog/LICENSE \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/tlog
|
||||
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kernel_settings/README.md \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kernel_settings/README.html \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kernel_settings/LICENSE \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}kernel_settings/COPYING \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/kernel_settings
|
||||
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}logging/README.md \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}logging/README.html \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}logging/LICENSE \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}logging/COPYING \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/logging
|
||||
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}nbde_server/README.md \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}nbde_server/README.html \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}nbde_server/LICENSE \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/nbde_server
|
||||
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}nbde_client/README.md \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}nbde_client/README.html \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}nbde_client/LICENSE \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/nbde_client
|
||||
|
||||
cp -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}certificate/README.md \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}certificate/README.html \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}certificate/LICENSE \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/certificate
|
||||
|
||||
%files
|
||||
%dir %{_datadir}/ansible
|
||||
%dir %{_datadir}/ansible/roles
|
||||
@ -262,6 +386,13 @@ rmdir $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples
|
||||
%{_datadir}/ansible/roles/%{rolealtprefix}timesync
|
||||
%{_datadir}/ansible/roles/%{rolealtprefix}network
|
||||
%{_datadir}/ansible/roles/%{rolealtprefix}storage
|
||||
%{_datadir}/ansible/roles/%{rolealtprefix}metrics
|
||||
%{_datadir}/ansible/roles/%{rolealtprefix}tlog
|
||||
%{_datadir}/ansible/roles/%{rolealtprefix}kernel_settings
|
||||
%{_datadir}/ansible/roles/%{rolealtprefix}logging
|
||||
%{_datadir}/ansible/roles/%{rolealtprefix}nbde_server
|
||||
%{_datadir}/ansible/roles/%{rolealtprefix}nbde_client
|
||||
%{_datadir}/ansible/roles/%{rolealtprefix}certificate
|
||||
%endif
|
||||
%{_datadir}/ansible/roles/%{roleprefix}kdump
|
||||
%{_datadir}/ansible/roles/%{roleprefix}postfix
|
||||
@ -269,6 +400,13 @@ rmdir $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples
|
||||
%{_datadir}/ansible/roles/%{roleprefix}timesync
|
||||
%{_datadir}/ansible/roles/%{roleprefix}network
|
||||
%{_datadir}/ansible/roles/%{roleprefix}storage
|
||||
%{_datadir}/ansible/roles/%{roleprefix}metrics
|
||||
%{_datadir}/ansible/roles/%{roleprefix}tlog
|
||||
%{_datadir}/ansible/roles/%{roleprefix}kernel_settings
|
||||
%{_datadir}/ansible/roles/%{roleprefix}logging
|
||||
%{_datadir}/ansible/roles/%{roleprefix}nbde_server
|
||||
%{_datadir}/ansible/roles/%{roleprefix}nbde_client
|
||||
%{_datadir}/ansible/roles/%{roleprefix}certificate
|
||||
%doc %{_pkgdocdir}/*/example-*-playbook.yml
|
||||
%doc %{_pkgdocdir}/network/example-inventory
|
||||
%doc %{_pkgdocdir}/*/README.md
|
||||
@ -279,12 +417,26 @@ rmdir $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.md
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}network/README.md
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}storage/README.md
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}metrics/README.md
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}tlog/README.md
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}kernel_settings/README.md
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}logging/README.md
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}nbde_server/README.md
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}nbde_client/README.md
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}certificate/README.md
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}kdump/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}postfix/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}selinux/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}timesync/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}network/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}storage/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}metrics/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}tlog/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}kernel_settings/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}logging/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}nbde_server/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}nbde_client/README.html
|
||||
%doc %{_datadir}/ansible/roles/%{roleprefix}certificate/README.html
|
||||
|
||||
|
||||
%license %{_pkgdocdir}/*/COPYING
|
||||
@ -295,8 +447,83 @@ rmdir $RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{roleprefix}network/examples
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}timesync/COPYING
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}network/LICENSE
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}storage/LICENSE
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}metrics/LICENSE
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}tlog/LICENSE
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}kernel_settings/LICENSE
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}kernel_settings/COPYING
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}logging/LICENSE
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}logging/COPYING
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}nbde_server/LICENSE
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}nbde_client/LICENSE
|
||||
%license %{_datadir}/ansible/roles/%{roleprefix}certificate/LICENSE
|
||||
|
||||
%changelog
|
||||
* Tue Sep 22 2020 Pavel Cahyna <pcahyna@redhat.com> - 1.0-20
|
||||
- storage: backport upstream PR #168 to prevent toggling encryption in safe mode,
|
||||
as it is a destructive operation. Resolves rhbz#1881524
|
||||
|
||||
* Mon Aug 24 2020 Pavel Cahyna <pcahyna@redhat.com> - 1.0-19
|
||||
- Rebase network role to latest upstream, resolves rhbz#1800627
|
||||
Drop a downstream patch with a test workaround that is not needed anymore.
|
||||
- Fix script for role prefix transformation
|
||||
- Rebase metrics role to pick up test changes, PR #19
|
||||
- Rebase kernel_settings role to latest upstream, resolves rhbz#1851557
|
||||
|
||||
* Mon Aug 24 2020 Pavel Cahyna <pcahyna@redhat.com> - 1.0-18
|
||||
- Rebase storage role to latest upstream, resolves rhbz#1848254, rhbz#1851654,
|
||||
rhbz#1862867
|
||||
- Rebase nbde_client role to latest upstream, resolves rhbz#1851654
|
||||
- Rebase logging role to latest upstream, resolves rhbz#1851654, rhbz#1861318
|
||||
- Rebase metrics role to latest upstream, resolves rhbz#1869390, rhbz#1869389,
|
||||
rhbz#1868378
|
||||
|
||||
* Fri Aug 21 2020 Pavel Cahyna <pcahyna@redhat.com> - 1.0-17
|
||||
- Rebase certificate role to latest upstream, resolves rhbz#1859547
|
||||
|
||||
* Mon Aug 10 2020 Pavel Cahyna <pcahyna@redhat.com> - 1.0-16
|
||||
- Rebase logging role to latest upstream, resolves rhbz#1854546, rhbz#1861318,
|
||||
rhbz#1860896, adds test for rhbz#1850790
|
||||
- Rebase metrics role to latest upstream, resolves rhbz#1855544, rhbz#1855539,
|
||||
rhbz#1848763
|
||||
- Fix whitespace in postfix role patch
|
||||
|
||||
* Fri Jul 31 2020 Pavel Cahyna <pcahyna@redhat.com> - 1.0-15
|
||||
- Rebase storage role to latest upstream, resolves rhbz#1854191, rhbz#1848250,
|
||||
rhbz#1850790 (including test)
|
||||
- Rebase nbde_client role to latest upstream, adds test for rhbz#1850790
|
||||
- Rebase certificate role to latest upstream, adds test for rhbz#1850790
|
||||
- Rebase nbde_server role to latest upstream, resolves rhbz#1850790
|
||||
(including test)
|
||||
- Rebase tlog role to latest upstream, resolves rhbz#1855424
|
||||
- Rebase kernel_settings role to rev b8bc86b, resolves rhbz#1850790
|
||||
- Add EL 8 to supported versions in postfix and kdump role metadata,
|
||||
resolves rhbz#1861661
|
||||
|
||||
* Mon Jul 20 2020 Rich Megginson <rmeggins@redhat.com> - 1.0-14
|
||||
- Rebase certificate role to latest upstream, resolves rhbz#1858840
|
||||
|
||||
* Fri Jul 17 2020 Rich Megginson <rmeggins@redhat.com> - 1.0-13
|
||||
- Rebase certificate role to latest upstream, resolves rhbz#1858316, rhbz#1848745
|
||||
|
||||
* Mon Jun 29 2020 Pavel Cahyna <pcahyna@redhat.com> - 1.0-12
|
||||
- Rebase network role to latest upstream, resolves rhbz#1822777, rhbz#1848472
|
||||
- Rebase logging role to latest upstream, resolves rhbz#1850790,
|
||||
rhbz#1851804, rhbz#1848762
|
||||
- Rebase certificate role to latest upstream, resolves rhbz#1848742,
|
||||
rhbz#1850790
|
||||
- Rebase nbde_client role to latest upstream, resolves rhbz#1848766,
|
||||
rhbz#1850790
|
||||
|
||||
* Mon Jun 15 2020 Pavel Cahyna <pcahyna@redhat.com> - 1.0-11
|
||||
- Rebase network role to latest upstream
|
||||
- Remove all the soon-unnecessary tier1 tags in test
|
||||
- Add a workaround for rhbz#1800627 in test
|
||||
- Modify patches to remove tier1 tags
|
||||
- Add metrics, tlog, logging, kernel_settings roles
|
||||
- Add nbde_client, nbde_server, certificate roles
|
||||
- Rebase storage role to latest upstream: adds support for mdraid, LUKS,
|
||||
swap manangement
|
||||
|
||||
* Mon Oct 21 2019 Pavel Cahyna <pcahyna@redhat.com> - 1.0-10
|
||||
- Add the storage_safe_mode option, true by default, to prevent accidental
|
||||
data removal: rhbz#1763242, issue #42, PR #43 and #51.
|
||||
|
Loading…
Reference in New Issue
Block a user