More new stuff

This commit is contained in:
Chris Hammer 2025-01-27 17:32:23 -05:00
parent 7a93d8d72a
commit 6eedbd74e0
13 changed files with 231 additions and 4 deletions

View File

@ -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:

12
check_file.yml Normal file
View File

@ -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

4
hosts
View File

@ -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

39
ice_cream.yml Normal file
View File

@ -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

13
ice_cream2.yml Normal file
View File

@ -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 }}

17
ice_cream3.yml Normal file
View File

@ -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 }}"

18
ice_cream4.yml Normal file
View File

@ -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

15
scripts/ice_cream_cone.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
cat << EOF
,--.
/ \\
|------|
\ /
'--'
||
// \\
( )
/_ _\\
( _ )
`-'`
EOF

7
scripts/ipu.sh Normal file
View File

@ -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

View File

@ -0,0 +1,11 @@
,--.
/ \
|------|
\ /
'--'
||
// \\
( )
/_ _\\
( _ )
`-'`

47
versionlock.md Normal file
View File

@ -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

28
versionlock.yml Normal file
View File

@ -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

15
vte.yml Normal file
View File

@ -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