Skip to content

Commit 318e019

Browse files
cjeanneropenshift-merge-bot[bot]
authored andcommitted
Allow to specify pool directory
This PR adds a new parameter to define the pool directory. It's mostly for advanced usage, related to the OCP cluster node provisioning changes coming to the Framework. This patch also ensures we're passing a valid "action" to the storage_pool.yml tasks file.
1 parent e5f9d1d commit 318e019

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

roles/libvirt_manager/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Used for checking if:
2020
* `cifmw_libvirt_manager_images_url`: (String) Location basedir for the image URI. Defaults to `https://cloud.centos.org/centos/9-stream/x86_64/images`.
2121
* `cifmw_libvirt_manager_configuration`: (Dict) Structure describing the libvirt layout (networking and VMs).
2222
* `cifmw_libvirt_manager_crc_pool`: (String) CRC pool machine location. Defaults to `cifmw_crc_pool` which defaults to `~/.crc/machines/crc`.
23+
* `cifmw_libvirt_manager_pool_dir`: (String) Pool directory. Defaults to `cifmw_libvirt_manager_basedir/volumes`.Advanced use only.
2324
* `cifmw_libvirt_manager_installyamls`: (String) install_yamls repository location. Defaults to `cifmw_installyamls_repos` which defaults to `../..`
2425
* `cifmw_libvirt_manager_dryrun`: (Boolean) Toggle ci_make `dry_run` parameter. Defaults to `false`.
2526
* `cifmw_libvirt_manager_compute_amount`: (Integer) State the amount of computes you want. Defaults to `1`.

roles/libvirt_manager/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ cifmw_libvirt_manager_configuration:
4747

4848
cifmw_libvirt_manager_crc_pool: "{{ cifmw_crc_pool | default(lookup('env', 'HOME')) ~ '/.crc/machines/crc' }}"
4949
cifmw_libvirt_manager_pool:
50+
cifmw_libvirt_manager_pool_dir: "{{ cifmw_libvirt_manager_basedir }}/volumes"
5051
cifmw_libvirt_manager_installyamls: "{{ cifmw_installyamls_repos | default('../..') }}"
5152
cifmw_libvirt_manager_dryrun: false
5253
cifmw_libvirt_manager_daemon: libvirtd.service

roles/libvirt_manager/tasks/storage_pool.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
# License for the specific language governing permissions and limitations
1515
# under the License.
1616

17+
- name: Ensure we have a know action
18+
ansible.builtin.assert:
19+
that:
20+
- action is defined
21+
- action in ['create', 'delete']
1722

1823
- name: Gather the status of cifmw-pool storage pool.
1924
register: pool_exists
@@ -35,7 +40,7 @@
3540
pool-define-as
3641
--name {{ cifmw_libvirt_manager_storage_pool }}
3742
--type dir
38-
--target {{ cifmw_libvirt_manager_basedir }}/volumes
43+
--target {{ cifmw_libvirt_manager_pool_dir }}
3944
4045
- name: Ensure the storage pool is started
4146
ansible.builtin.command:

0 commit comments

Comments
 (0)