https://github.com/karmab/ansible-kcli-modules
ansible modules for kcli
https://github.com/karmab/ansible-kcli-modules
ansilbe galaxy kcli
Last synced: 3 months ago
JSON representation
ansible modules for kcli
- Host: GitHub
- URL: https://github.com/karmab/ansible-kcli-modules
- Owner: karmab
- Created: 2018-02-02T22:53:14.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2024-09-09T09:36:35.000Z (over 1 year ago)
- Last Synced: 2024-09-09T11:33:50.504Z (over 1 year ago)
- Topics: ansilbe, galaxy, kcli
- Language: Python
- Size: 29.3 KB
- Stars: 3
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ansible-kcli-modules
Provides access to the latest release of the kcli modules.
Include this role in a playbook, and any other plays, roles, and includes will have access to the modules.
The modules are found [here](./plugins/modules)
## Requirements
- Ansible >= 2.9, it is recommended to download the latest version of [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html).
- [kcli](https://github.com/karmab/kcli)
## Installation
Use the Ansible Galaxy client to install the latest version of the collection:
```
$ ansible-galaxy collection install karmab.kcli
```
or using `requirements.yml`:
```yaml
collections:
- name: karmab.kcli
```
## How to use
The following modules are available
- kcli_vm
- kcli_info
- kcli_plan
- kcli_product
- kcli_cluster
For all of them, apart from mandatory parameters, you can provide a parameters dict with all your parameters
#### kcli_vm
```yaml
- name: Create vm tahitibob from centos8stream image and forcing memory to be 2G
karmab.kcli.kcli_vm:
name: tahitibob
state: present
image: centos8stream
parameters:
memory: 2048
register: result
- debug: var=result
```
|Parameter |Required |Default Value |
|------------|---------|----------------------|
|name |true | |
|client |false | |
|image |false | |
|profile |false | |
|parameters |false |Empty dict |
#### kcli_info
```yaml
- name: Get ip from vm tahitibob
karmab.kcli.kcli_info:
name: tahitibob
register: result
- debug: var=result.meta.ip
```
|Parameter |Required |Default Value |
|------------|---------|----------------------|
|name |true | |
|client |false | |
|fields |false |Empty list |
|parameters |false |Empty dict |
#### kcli_plan
```yaml
- name: Launch plan wilibonka from plan file myplan.yml
karmab.kcli.kcli_plan:
name: wilibonka
inputfile: myplan.yml
register: result
- debug: var=result
```
|Parameter |Required |Default Value |
|------------|---------|----------------------|
|name |true | |
|client |false | |
|inputfile |false | |
|parameters |false |Empty dict |
#### kcli_cluster
```yaml
- name: Create a k8s cluster
karmab.kcli.kcli_cluster:
state: absent
name: myclu
type: kubeadm
parameters:
ctlplanes: 3
workers: 2
register: result
- debug: var=result
```
|Parameter |Required |Default Value |
|------------|---------|----------------------|
|name |true | |
|client |false | |
|type |false |generic |
|parameters |false |Empty dict |
#### kcli_product
```yaml
- name: Deploy product origin, provided there is a kcli repo providing it
karmab.kcli.kcli_product:
name: microshift
product: microshift
```
|Parameter |Required |Default Value |
|------------|---------|----------------------|
|name |true | |
|client |false | |
|product |true | |
|repo |false | |
|parameters |false |Empty dict |
## License
Apache V2