Skip to content

Commit

Permalink
feat: automate install of zhmc dependencies (#86)
Browse files Browse the repository at this point in the history
Automatically install ibm.ibm_zhmc collection's python package
dependencies, and update docs to match.

Signed-off-by: Jacob Emery <jacob.emery@ibm.com>
  • Loading branch information
jacobemery committed Feb 17, 2023
1 parent de97a90 commit 1e9fe33
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 0 additions & 3 deletions docs/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ ansible-galaxy collection install community.general community.crypto ansible.pos
```
* If you will be using these playbooks to automate the creation of the LPAR(s) that will act as KVM host(s) for the cluster, you will also need:
```
pip3 install zhmcclient cryptography packaging PyYAML
```
```
ansible-galaxy collection install ibm.ibm_zhmc
```
* If you are using MacOS, you also need to have [Homebrew](https://brew.sh/) package manager installed:
Expand Down
10 changes: 10 additions & 0 deletions playbooks/1_create_lpar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
vars_files:
- "{{ inventory_dir }}/group_vars/all.yaml"
tasks:
- name: Install required python packages.
ansible.builtin.pip:
name: "{{ item }}"
loop:
- requests
- zhmcclient
- cryptography
- packaging
- PyYAML

- name: Include vars for first LPAR if it is to be created.
include_vars:
file: "{{ inventory_dir }}/host_vars/{{ env.z.lpar1.hostname }}.yaml"
Expand Down

0 comments on commit 1e9fe33

Please sign in to comment.