From 6eedbd74e0052f968be05c1f24ecf9dcfb8d527b Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Mon, 27 Jan 2025 17:32:23 -0500 Subject: [PATCH] More new stuff --- check_device2.yml | 9 +++++-- check_file.yml | 12 ++++++++++ hosts | 4 ++-- ice_cream.yml | 39 ++++++++++++++++++++++++++++++ ice_cream2.yml | 13 ++++++++++ ice_cream3.yml | 17 ++++++++++++++ ice_cream4.yml | 18 ++++++++++++++ scripts/ice_cream_cone.sh | 15 ++++++++++++ scripts/ipu.sh | 7 ++++++ templates/ice_cream_cone.j2 | 11 +++++++++ versionlock.md | 47 +++++++++++++++++++++++++++++++++++++ versionlock.yml | 28 ++++++++++++++++++++++ vte.yml | 15 ++++++++++++ 13 files changed, 231 insertions(+), 4 deletions(-) create mode 100644 check_file.yml create mode 100644 ice_cream.yml create mode 100644 ice_cream2.yml create mode 100644 ice_cream3.yml create mode 100644 ice_cream4.yml create mode 100755 scripts/ice_cream_cone.sh create mode 100644 scripts/ipu.sh create mode 100644 templates/ice_cream_cone.j2 create mode 100644 versionlock.md create mode 100644 versionlock.yml create mode 100644 vte.yml diff --git a/check_device2.yml b/check_device2.yml index 754a6ec..cb29bb9 100644 --- a/check_device2.yml +++ b/check_device2.yml @@ -9,10 +9,15 @@ - device: "/dev/mapper/system-root" size: 81229615104 + - device: "/dev/mapper/system-applog" + size: 81229615104 + tasks: - - name: Get the mount point info + - name: Get the mount point info # noqa: ignore-errors ansible.builtin.set_fact: - shrink_lv_mount_info: "{{ ansible_facts.mounts | selectattr('device', 'equalto', shrink_lv_devices[0].device) }}" + shrink_lv_mount_info: "{{ ansible_facts.mounts | selectattr('device', 'equalto', item.device) | first }}" + ignore_errors: true + loop: "{{ shrink_lv_devices }}" - name: Debug shrink_lv_mount_info ansible.builtin.debug: diff --git a/check_file.yml b/check_file.yml new file mode 100644 index 0000000..535f30f --- /dev/null +++ b/check_file.yml @@ -0,0 +1,12 @@ +--- +- name: Something + hosts: temp + become: false + gather_facts: true + + tasks: + - name: Kill the conf file + ansible.builtin.file: + path: /var/ipe/ipu/el7to8/bigboot_disabled_services.log + state: absent + diff --git a/hosts b/hosts index 182c2d7..a8c233e 100644 --- a/hosts +++ b/hosts @@ -3,7 +3,7 @@ # bigboot-test-custom-2 ansible_host=10.10.42.13 # bigboot-test-custom-4 ansible_host=10.10.42.15 # bigboot-test-custom-5 ansible_host=10.10.42.16 -bigboot-test-custom-6 ansible_host=10.10.42.1 +bigboot-test-custom-6 ansible_host=10.10.42.91 # bigboot-test-custom-7 ansible_host=10.10.42.2 # bigboot-test-custom-8 ansible_host=10.10.42.216 # bigboot-test-custom-9 ansible_host=10.1.1.80 @@ -36,7 +36,7 @@ rear-client ansible_host=10.10.42.192 ansible_user=root [temp] -rear-client ansible_host=10.10.42.192 +pkg-locks ansible_host=10.10.42.58 [temp:vars] ansible_user=root diff --git a/ice_cream.yml b/ice_cream.yml new file mode 100644 index 0000000..b6bd6a3 --- /dev/null +++ b/ice_cream.yml @@ -0,0 +1,39 @@ +--- +- name: Draw ASCII Ice Cream Cone + hosts: localhost + gather_facts: no + + vars: + ascii_art: | + ,--. + / \ + |------| + \ / + '--' + || + // \\ + ( ) + /_ _\\ + ( _ ) + `-'` + + tasks: + - name: Create a temporary file for the ASCII art + tempfile: + state: touch + suffix: .txt + register: temp_file + + - name: Write ASCII ice cream cone to the temporary file + copy: + dest: "{{ temp_file.path }}" + content: "{{ ascii_art }}" + + - name: Display the ASCII ice cream cone from the file + shell: cat {{ temp_file.path }} + + - name: Clean up temporary file + file: + path: "{{ temp_file.path }}" + state: absent + diff --git a/ice_cream2.yml b/ice_cream2.yml new file mode 100644 index 0000000..202bb89 --- /dev/null +++ b/ice_cream2.yml @@ -0,0 +1,13 @@ +--- +- name: Display ASCII Art + hosts: localhost + gather_facts: false + + vars: + ascii_art: "{{ lookup('template', 'ice_cream_cone.j2') }}" + + tasks: + - name: Print ASCII Art + ansible.builtin.debug: + msg: > + {{ ascii_art }} diff --git a/ice_cream3.yml b/ice_cream3.yml new file mode 100644 index 0000000..84cd6ce --- /dev/null +++ b/ice_cream3.yml @@ -0,0 +1,17 @@ +--- +- name: Display ASCII Art + hosts: localhost + gather_facts: false + + tasks: + - name: Print ASCII Art from Shell Script + ansible.builtin.command: scripts/ice_cream_cone.sh + register: ascii_art_output + + - name: Debug ascii_art_output + ansible.builtin.debug: + var: ascii_art_output + + - name: Display the ASCII Art Output + ansible.builtin.debug: + msg: "{{ ascii_art_output.stdout_lines }}" diff --git a/ice_cream4.yml b/ice_cream4.yml new file mode 100644 index 0000000..a6eb284 --- /dev/null +++ b/ice_cream4.yml @@ -0,0 +1,18 @@ +--- +- name: Display ASCII Art + hosts: localhost + gather_facts: false + + vars: + script_path: "scripts/ice_cream_cone.sh" + + tasks: + - name: Print ASCII Art from Shell Script + ansible.builtin.command: "{{ script_path }}" + register: ascii_art_output + failed_when: ascii_art_output.rc != 0 or ascii_art_output.stderr | trim + + - name: Display the ASCII Art Output + ansible.builtin.debug: + msg: "{{ ascii_art_output.stdout_lines }}" + when: not ascii_art_output.failed diff --git a/scripts/ice_cream_cone.sh b/scripts/ice_cream_cone.sh new file mode 100755 index 0000000..48078da --- /dev/null +++ b/scripts/ice_cream_cone.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +cat << EOF + ,--. + / \\ +|------| + \ / + '--' + || + // \\ + ( ) +/_ _\\ +( _ ) +`-'` +EOF diff --git a/scripts/ipu.sh b/scripts/ipu.sh new file mode 100644 index 0000000..9e263c2 --- /dev/null +++ b/scripts/ipu.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +yum install leapp-upgrade yum-plugin-versionlock +rmmod floppy pata_acpi +yum versionlock list +cat /etc/yum/pluginconf.d/versionlock.list +time leapp preupgrade --target 8.10 diff --git a/templates/ice_cream_cone.j2 b/templates/ice_cream_cone.j2 new file mode 100644 index 0000000..5a9f231 --- /dev/null +++ b/templates/ice_cream_cone.j2 @@ -0,0 +1,11 @@ + ,--. + / \ + |------| + \ / + '--' + || + // \\ + ( ) + /_ _\\ + ( _ ) + `-'` diff --git a/versionlock.md b/versionlock.md new file mode 100644 index 0000000..aeb5c1c --- /dev/null +++ b/versionlock.md @@ -0,0 +1,47 @@ +pinned pre: +----------- +leapp-0.17.0-2.el7_9.noarch +leapp-upgrade-el7toel8-0.20.0-13.el7_9.noarch +leapp-upgrade-el7toel8-deps-0.20.0-13.el7_9.noarch +leapp-deps-0.17.0-2.el7_9.noarch +python2-leapp-0.17.0-2.el7_9.noarch + +pinned post: +------------ +leapp-0.17.0-2.el7_9.noarch +leapp-upgrade-el7toel8-0.20.0-13.el7_9.noarch +leapp-repository-deps-el8-5.0.8-100.202401121819Z.0e51aebb.master.el8.noarch +leapp-deps-el8-5.0.8-100.202401121819Z.0e51aebb.master.el8.noarch +python2-leapp-0.17.0-2.el7_9.noarch + + +notes: +------ +leapp-repository-deps-el8 is a new pkg + - replaces leapp-upgrade-el7toel8-deps? +leapp-deps-0.17.0-2.el7_9 + - upgrades to leapp-deps-el8-5.0.8-100 + +leapp-0.17.0-2.el7_9 and python2-leapp-0.17.0-2.el7_8 + - versionlock potentially locked these successfully + +re-run ipu without version lock and re-check versions to verify valididity +of test results + + +re-run ipu, no pins: +-------------------- +leapp-0.17.0-2.el7_9.noarch +leapp-upgrade-el7toel8-0.20.0-13.el7_9.noarch +leapp-repository-deps-el8-5.0.8-100.202401121819Z.0e51aebb.master.el8.noarch +leapp-deps-el8-5.0.8-100.202401121819Z.0e51aebb.master.el8.noarch +python2-leapp-0.17.0-2.el7_9.noarch + + +re-run ipu, yum.conf excludes: +------------------------------ +leapp-0.17.0-2.el7_9.noarch +leapp-upgrade-el7toel8-0.20.0-13.el7_9.noarch +leapp-repository-deps-el8-5.0.8-100.202401121819Z.0e51aebb.master.el8.noarch +leapp-deps-el8-5.0.8-100.202401121819Z.0e51aebb.master.el8.noarch +python2-leapp-0.17.0-2.el7_9.noarch diff --git a/versionlock.yml b/versionlock.yml new file mode 100644 index 0000000..3596411 --- /dev/null +++ b/versionlock.yml @@ -0,0 +1,28 @@ +--- +- name: Version Lock + hosts: temp + become: false + gather_facts: false + + vars: + lock_pkgs: + - leapp-0.17.0-2.el7_9 + - leapp-upgrade-el7toel8-0.20.0-13.el7_9 + - leapp-upgrade-el7toel8-deps-0.20.0-13.el7_9 + - leapp-deps-0.17.0-2.el7_9 + - python2-leapp-0.17.0-2.el7_9 + + tasks: + - name: Install yum-plugin-versionlock + ansible.builtin.package: + name: yum-plugin-versionlock + state: present + + - name: "Version lock: {{ item }}" # noqa: command-instead-of-module + ansible.builtin.command: "yum versionlock {{ item }}" + register: r_lock_pkgs + loop: "{{ lock_pkgs }}" + + - name: Debug r_lock_pkgs + ansible.builtin.debug: + var: r_lock_pkgs diff --git a/vte.yml b/vte.yml new file mode 100644 index 0000000..d073663 --- /dev/null +++ b/vte.yml @@ -0,0 +1,15 @@ +--- +- name: Something + hosts: temp + become: false + gather_facts: false + + vars: + pkg_list: + - https://dlcdn.apache.org//directory/apacheds/dist/2.0.0.AM27/apacheds-2.0.0.AM27-x86_64.rpm + + tasks: + - name: Install packages from package list + ansible.builtin.yum: + name: "{{ pkg_list }}" + state: present