Skip to content

Commit

Permalink
Merge pull request #11 from Tronde/main
Browse files Browse the repository at this point in the history
Fix: Missing dependency of package rsync
  • Loading branch information
sscheib authored Sep 10, 2024
2 parents 16a9a59 + b407c30 commit 984a986
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Role Variables
| `quiet_assert` | `true` | false | whether to quiet asserts |
| `redhat_portal_auth_url` | Check in `defaults/main.yml` | false | URL to the Red Hat Portal to authenticate against |
| `redhat_portal_download_base_url` | Check in `defaults/main.yml` | false | base URL for image downloading from the Red Hat Customer Portal |
| `rsync_package_name` | `rsync` | false | name of the package that provides the command `rsync` |
| `temporary_mount_path` | `/mnt` | false | path to a temporary (empty) mount point to mount the downloaded ISO to |
| `temporary_work_dir_path` | `{{ playbook_dir }}/workdir` | false | temporary directory which will be used to extract the ISO files to |
| `temporary_work_dir_path_group` | `root` | false | group of the temporary directory to apply |
Expand Down Expand Up @@ -190,6 +191,7 @@ Dependencies

This role makes use of the [Ansible Posix collection](https://github.com/ansible-collections/ansible.posix).
Depending on whether certain actions are required, the role needs to install the following packages:
- `rsync`: To extract files from mounted ISO to work directory
- `xorriso`: To create a custom ISO
- `isomd5sum`: To implant a MD5 checksum into a custom ISO
- `pykickstart`: To validate a given Kickstart file
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ _def_dest_dir_path_mode: '0755'
# name of the package that provides xorriso
_def_xorriso_package_name: 'xorriso'

# name of the package that provides rsync
_def_rsync_package_name: 'rsync'

# relative path within the temporary_work_dir_source_files_path to the isolinux.bin file
_def_isolinux_bin_path: 'isolinux/isolinux.bin'

Expand Down
1 change: 1 addition & 0 deletions tasks/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
- '_dest_dir_path_group'
- '_dest_dir_path_mode'
- '_xorriso_package_name'
- '_rsync_package_name'
- '_isolinux_bin_path'
- '_boot_cat_path'
- '_pxelinux_cfg_path'
Expand Down
6 changes: 6 additions & 0 deletions tasks/extract_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
state: 'unmounted'
become: true

- name: 'extract_files | Ensure rsync is present'
ansible.builtin.package:
name: '{{ _rsync_package_name }}'
state: 'present'
become: true

- name: 'extract_files | Mount downloaded ISO to extract contents'
ansible.posix.mount:
path: '{{ _temporary_mount_path }}'
Expand Down
3 changes: 3 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ _dest_iso_filename: '{{ dest_iso_filename | default(None) }}'
# name of the package that provides xorriso
_xorriso_package_name: '{{ xorriso_package_name | default(_def_xorriso_package_name) }}'

# name of the package that provides rsync
_rsync_package_name: '{{ rsync_package_name | default(_def_rsync_package_name) }}'

# relative path within the temporary_work_dir_source_files_path to the isolinux.bin file
_isolinux_bin_path: '{{ isolinux_bin_path | default(_def_isolinux_bin_path) }}'

Expand Down

0 comments on commit 984a986

Please sign in to comment.