https://github.com/goldyfruit/ibmcloud-ansible-collection
Ansible collection (modules, roles & playbooks) to consume resources on IBM Cloud.
https://github.com/goldyfruit/ibmcloud-ansible-collection
ansible automation baremetal cloud collection cos ibmcloud modules playbooks power roles sdk vpc
Last synced: 7 months ago
JSON representation
Ansible collection (modules, roles & playbooks) to consume resources on IBM Cloud.
- Host: GitHub
- URL: https://github.com/goldyfruit/ibmcloud-ansible-collection
- Owner: goldyfruit
- License: lgpl-3.0
- Created: 2020-05-08T18:09:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T20:44:43.000Z (over 1 year ago)
- Last Synced: 2025-03-11T05:34:37.513Z (7 months ago)
- Topics: ansible, automation, baremetal, cloud, collection, cos, ibmcloud, modules, playbooks, power, roles, sdk, vpc
- Language: Python
- Homepage:
- Size: 223 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IBM Cloud Ansible Collections
This collection allows interactions with IBM Cloud VPC, Classic Infrastructure, etc... Modules will consume resources and make sure idempotency is respected as it should.
This collection leverage [IBM Cloud Python SDK](https://pypi.org/project/ibmcloud-python-sdk)
## Requirements
IBM Cloud API keys are required, to setup keys please have a look at the official [IBM Cloud documentation](https://cloud.ibm.com/docs/iam?topic=iam-manapikey).
- [IBM Cloud Access (IAM) API key](https://cloud.ibm.com/docs/iam?topic=iam-userapikey)
- [Classic Infrastructure API key](https://cloud.ibm.com/docs/iam?topic=iam-classic_keys)To setup credential please reead the [documentation](https://github.com/goldyfruit/ibmcloud-python-sdk).
- `ibmcloud-python-sdk` >= `1.0.0`
- `ansible` >= `2.9````shell
$ pip install ansible ibmcloud-python-sdk
```## Install
```shell
$ ansible-galaxy collection install goldyfruit.ibmcloud_automation
```The collection will be automatically installed in `~/.ansible/collections/ansible_collections/goldyfruit/` directory.
## Examples
### Create VPC and VSI
```yaml
---
- hosts: localhost
connection: local
gather_facts: no
collections:
- goldyfruit.ibmcloud_automationvars:
ibmcloud_file: "{{ lookup('env','HOME') }}/.ibmcloud/clouds.yaml"environment:
IC_CONFIG_FILE: "{{ ibmcloud_file }}"tasks:
- import_role:
name: quickstart
```### Upload QCOW2 image for VPC
```yaml
---
- hosts: localhost
connection: local
gather_facts: no
collections:
- goldyfruit.ibmcloud_automationvars:
ibmcloud_file: "{{ lookup('env','HOME') }}/.ibmcloud/clouds.yaml"environment:
IC_CONFIG_FILE: "{{ ibmcloud_file }}"tasks:
- import_role:
name: quickstart_image
```