Ansible-Role "ansible_lza_create_rhel_iso"
Description
This role provides all necessary tasks to create RHEL 7 installation ISO images to create servers for SLUBArchiv before bootstrapping them for a non-root user to take over.
Prerequisites
To use this role, the following software must be installed on your workstation:
- ansible
To deploy this role to a managed host, the following software must be installed on the target:
- Python3
- SSHd
In order to create a bootable ISO image, you have to provide a RHEL ISO image (named something like rhel-server-7.9-x86_64-dvd.iso
) in the role's root directory and set the correct version in vars/main.yml
. Just using the rhel-server-7.9-x86_64-boot.iso
does NOT work.
Quick start
ansible-playbook site.yml -i ~/inventory_tmp.yml --become
General Ansible usage
Most options already have sensible defaults in ansible.cfg
. However, you can override these defaults using CLI options/flags if you want to.
To simply run the playbook, just call the site.yml
playbook like this:
ansible-playbook site.yml -u <username>
If you want to limit the execution to a subset of all hosts that are listed in the inventory, use the -l
or --limit
option like this:
ansible-playbook site.yml -l <hostna*>
ansible-playbook site.yml -l <hostname>
ansible-playbook site.yml -l <hostname1>:<hostname2>:...
ansible-playbook site.yml -l <inventory_group>
ansible-playbook site.yml --limit=<hostna*>
If you do not have Vault password files in the directory above the role direcory, you have to give the Vault password before execution:
ansible-playbook site.yml --ask-vault-pass
You can use your own inventory file by adding the -i
or --inventory=INVENTORY
option:
ansible-playbook site.yml -i inventory.yml
ansible-playbook site.yml --inventory=inventory.yml
Tasks in this role have been tagged to enable users to only run subsets of tasks. This can be leveraged to decrease run times or run only certain tasks after small changes. To list all available tags, use:
ansible-playbook site.yml --list-tags
You can then run only certain tagged tasks by using the --tags
option:
ansible-playbook site.yml -t tag1,tag2,...,tagN
ansible-playbook site.yml --tags=tag1,tag2,...,tagN
For more help with ansible-playbook, use the --help
flag.
git configuration
Just run the setup_gitconfig.sh
script that comes with the repo to correctly setup all necessary local Git configurations.
Author Information
If you have any comments or find bugs, please contact langzeitarchiv@slub-dresden.de or issue a pull request.