diff --git a/README.md b/README.md index 334b6aa7c..c0591e816 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Forklift provides tools to create Foreman/Katello environments for development, - [Adding Custom Boxes](#adding-custom-boxes) - [Customize Deployment Settings](#customize-deployment-settings) - [Post Install Playbooks](#post-install-playbooks) + - [Using Local Ansible Collection](#using-local-ansible-collection) * [Production Environments](docs/production.md) * [Development Environments](docs/development.md) * [Stable Boxes](docs/stable_boxes.md) @@ -25,7 +26,7 @@ Forklift provides tools to create Foreman/Katello environments for development, ### Requirements * Vagrant - 2.2+ - Both the VirtualBox and Libvirt providers are tested -* Ansible - 2.7+ +* Ansible - 2.9+ * [Vagrant Libvirt provider plugin](https://github.com/vagrant-libvirt/vagrant-libvirt) (if using Libvirt) * Virtualization enabled in BIOS @@ -38,6 +39,7 @@ This will walk through the simplest path of spinning up a production test enviro ``` git clone https://github.com/theforeman/forklift.git cd forklift +ansible-galaxy collection install -r requirements.yml vagrant up centos7-foreman-nightly ``` @@ -281,3 +283,19 @@ ansible: - 'user_playbooks/vim.yml' - 'user_playbooks/zsh.yml' ``` + +### Using Local Ansible Collection + +If needing to use a local copy of an Ansible collection used by Forklift, such as developing updates to theforeman.operations collection, you can temporarily update the `requirements.yml` to point at your local checkout: + +``` +collections: + - name: git+file:///home/user/path/to/repo/.git + type: git +``` + +Then run `ansible-galaxy` install: + +``` +ansible-galaxy collection install -r requirements.yml --force +``` diff --git a/playbooks/setup_forklift.yml b/playbooks/setup_forklift.yml index f55cc30d9..076db8ff5 100644 --- a/playbooks/setup_forklift.yml +++ b/playbooks/setup_forklift.yml @@ -14,6 +14,7 @@ forklift_url: "https://github.com/theforeman/forklift" forklift_dest: "{{ ansible_env.HOME }}/forklift" forklift_version: master + forklift_install_from_galaxy: True forklift_install_pulp_from_galaxy: False forklift_config: libvirt_options: @@ -44,6 +45,12 @@ dest: "{{ forklift_dest }}/vagrant/settings.yaml" - name: 'Install Forklift collection dependencies' + command: + cmd: ansible-galaxy collection install -r requirements.yml + chdir: "{{ forklift_dest }}" + when: forklift_install_from_galaxy + + - name: 'Install Forklift Pulp collection dependencies' command: cmd: ansible-galaxy collection install -r requirements-pulp.yml chdir: "{{ forklift_dest }}" diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 000000000..18e424024 --- /dev/null +++ b/requirements.yml @@ -0,0 +1,2 @@ +collections: + - theforeman.operations diff --git a/roles/foreman_installer/tasks/upgrade.yml b/roles/foreman_installer/tasks/upgrade.yml index 31b2c2931..80e5083de 100644 --- a/roles/foreman_installer/tasks/upgrade.yml +++ b/roles/foreman_installer/tasks/upgrade.yml @@ -7,6 +7,13 @@ import_role: name: update_os_packages +- name: 'Upgrade postgresql' + import_role: + name: theforeman.operations.postgresql_upgrade + when: + - ansible_os_family == "RedHat" + - ansible_distribution_major_version == '8' + - include_tasks: installer_version.yml - name: 'Set internal installer options'