AnsibleRun represents a set of Ansible Playbooks.
Type
CRD
Group
ansible.crossplane.io
Version
v1alpha1
apiVersion: ansible.crossplane.io/v1alpha1
kind: AnsibleRun
A AnsibleRunSpec defines the desired state of a AnsibleRun.
AnsibleRunParameters are the configurable fields of a AnsibleRun.
The remote configuration of this AnsibleRun; the content can be retrieved from Ansible Galaxy as community contents
ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured.
ProviderReference specifies the provider that will be used to create, observe, update, and delete this managed resource. Deprecated: Please use ProviderConfigReference, i.e. providerConfigRef
WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource.
A AnsibleRunStatus represents the observed state of a AnsibleRun.
Conditions of the resource.
gcpbucket
apiVersion: ansible.crossplane.io/v1alpha1
kind: AnsibleRun
metadata:
annotations:
ansible.crossplane.io/runPolicy: ObserveAndDelete
name: gcpbucket
spec:
forProvider:
playbookInline: |
---
- hosts: localhost
tasks:
- name: create a gcp bucket
google.cloud.gcp_storage_bucket:
name: ansible-storage-module
project: test-project
auth_kind: serviceaccount
service_account_file: gcp-credentials.json
state: present
when: ansible_provider_meta.gcpbucket.state == 'present'
providerConfigRef:
name: default
gcpdisk
apiVersion: ansible.crossplane.io/v1alpha1
kind: AnsibleRun
metadata:
annotations:
ansible.crossplane.io/runPolicy: CheckWhenObserve
name: gcpdisk
spec:
forProvider:
roles:
- name: ansible_provider.gcpdisk_role
src: https://github.com/multicloudlab/crossplane-ansible-provider-sample.git
vars:
project:
disk:
key: 718BDCC469891
size: 20
zone: europe-west1-b
id: test_project
providerConfigRef:
name: gcpconfig