mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-06 12:07:14 +00:00
modules: fix examples to use FQCN (#644)
* modules: fix examples to use FQCN * fix * fix * fix
This commit is contained in:
parent
8b92e0454d
commit
41cfdda6a3
533 changed files with 2130 additions and 2130 deletions
|
|
@ -26,14 +26,14 @@ notes:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Gather all facts of cloud init
|
||||
cloud_init_data_facts:
|
||||
community.general.cloud_init_data_facts:
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
var: result
|
||||
|
||||
- name: Wait for cloud init to finish
|
||||
cloud_init_data_facts:
|
||||
community.general.cloud_init_data_facts:
|
||||
filter: status
|
||||
register: res
|
||||
until: "res.cloud_init_data_facts.status.v1.stage is defined and not res.cloud_init_data_facts.status.v1.stage"
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ RETURN = ''' # '''
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Install helm chart
|
||||
helm:
|
||||
community.general.helm:
|
||||
host: localhost
|
||||
chart:
|
||||
name: memcached
|
||||
|
|
@ -74,13 +74,13 @@ EXAMPLES = '''
|
|||
namespace: default
|
||||
|
||||
- name: Uninstall helm chart
|
||||
helm:
|
||||
community.general.helm:
|
||||
host: localhost
|
||||
state: absent
|
||||
name: my-memcached
|
||||
|
||||
- name: Install helm chart from a git repo
|
||||
helm:
|
||||
community.general.helm:
|
||||
host: localhost
|
||||
chart:
|
||||
source:
|
||||
|
|
@ -93,7 +93,7 @@ EXAMPLES = '''
|
|||
foo: "bar"
|
||||
|
||||
- name: Install helm chart from a git repo specifying path
|
||||
helm:
|
||||
community.general.helm:
|
||||
host: localhost
|
||||
chart:
|
||||
source:
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Basic example to provision from image
|
||||
ovirt:
|
||||
community.general.ovirt:
|
||||
user: admin@internal
|
||||
url: https://ovirt.example.com
|
||||
instance_name: ansiblevm04
|
||||
|
|
@ -150,7 +150,7 @@ EXAMPLES = '''
|
|||
resource_type: template
|
||||
|
||||
- name: Full example to create new instance from scratch
|
||||
ovirt:
|
||||
community.general.ovirt:
|
||||
instance_name: testansible
|
||||
resource_type: new
|
||||
instance_type: server
|
||||
|
|
@ -171,7 +171,7 @@ EXAMPLES = '''
|
|||
disk_int: virtio
|
||||
|
||||
- name: Stopping an existing instance
|
||||
ovirt:
|
||||
community.general.ovirt:
|
||||
instance_name: testansible
|
||||
state: stopped
|
||||
user: admin@internal
|
||||
|
|
@ -179,7 +179,7 @@ EXAMPLES = '''
|
|||
url: https://ovirt.example.com
|
||||
|
||||
- name: Start an existing instance
|
||||
ovirt:
|
||||
community.general.ovirt:
|
||||
instance_name: testansible
|
||||
state: started
|
||||
user: admin@internal
|
||||
|
|
@ -187,7 +187,7 @@ EXAMPLES = '''
|
|||
url: https://ovirt.example.com
|
||||
|
||||
- name: Start an instance with cloud init information
|
||||
ovirt:
|
||||
community.general.ovirt:
|
||||
instance_name: testansible
|
||||
state: started
|
||||
user: admin@internal
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ author: Sergei Antipov (@UnderGreen)
|
|||
|
||||
EXAMPLES = r'''
|
||||
- name: Create new container with minimal options
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
|
|
@ -160,7 +160,7 @@ EXAMPLES = r'''
|
|||
ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
|
||||
|
||||
- name: Create new container with hookscript and description
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
|
|
@ -173,7 +173,7 @@ EXAMPLES = r'''
|
|||
description: created with ansible
|
||||
|
||||
- name: Create new container automatically selecting the next available vmid.
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
node: 'uk-mc02'
|
||||
api_user: 'root@pam'
|
||||
api_password: '1q2w3e'
|
||||
|
|
@ -183,7 +183,7 @@ EXAMPLES = r'''
|
|||
ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
|
||||
|
||||
- name: Create new container with minimal options with force(it will rewrite existing container)
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
|
|
@ -195,7 +195,7 @@ EXAMPLES = r'''
|
|||
force: yes
|
||||
|
||||
- name: Create new container with minimal options use environment PROXMOX_PASSWORD variable(you should export it before)
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
|
|
@ -205,7 +205,7 @@ EXAMPLES = r'''
|
|||
ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
|
||||
|
||||
- name: Create new container with minimal options defining network interface with dhcp
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
|
|
@ -217,7 +217,7 @@ EXAMPLES = r'''
|
|||
netif: '{"net0":"name=eth0,ip=dhcp,ip6=dhcp,bridge=vmbr0"}'
|
||||
|
||||
- name: Create new container with minimal options defining network interface with static ip
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
|
|
@ -229,7 +229,7 @@ EXAMPLES = r'''
|
|||
netif: '{"net0":"name=eth0,gw=192.168.0.1,ip=192.168.0.2/24,bridge=vmbr0"}'
|
||||
|
||||
- name: Create new container with minimal options defining a mount with 8GB
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
|
|
@ -241,7 +241,7 @@ EXAMPLES = r'''
|
|||
mounts: '{"mp0":"local:8,mp=/mnt/test/"}'
|
||||
|
||||
- name: Create new container with minimal options defining a cpu core limit
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
|
|
@ -253,7 +253,7 @@ EXAMPLES = r'''
|
|||
cores: 2
|
||||
|
||||
- name: Start container
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
api_user: root@pam
|
||||
api_password: 1q2w3e
|
||||
|
|
@ -263,7 +263,7 @@ EXAMPLES = r'''
|
|||
- name: >
|
||||
Start container with mount. You should enter a 90-second timeout because servers
|
||||
with additional disks take longer to boot
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
api_user: root@pam
|
||||
api_password: 1q2w3e
|
||||
|
|
@ -272,7 +272,7 @@ EXAMPLES = r'''
|
|||
timeout: 90
|
||||
|
||||
- name: Stop container
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
api_user: root@pam
|
||||
api_password: 1q2w3e
|
||||
|
|
@ -280,7 +280,7 @@ EXAMPLES = r'''
|
|||
state: stopped
|
||||
|
||||
- name: Stop container with force
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
api_user: root@pam
|
||||
api_password: 1q2w3e
|
||||
|
|
@ -289,7 +289,7 @@ EXAMPLES = r'''
|
|||
state: stopped
|
||||
|
||||
- name: Restart container(stopped or mounted container you can't restart)
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
api_user: root@pam
|
||||
api_password: 1q2w3e
|
||||
|
|
@ -297,7 +297,7 @@ EXAMPLES = r'''
|
|||
state: restarted
|
||||
|
||||
- name: Remove container
|
||||
proxmox:
|
||||
community.general.proxmox:
|
||||
vmid: 100
|
||||
api_user: root@pam
|
||||
api_password: 1q2w3e
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ requirements: [ "proxmoxer", "requests" ]
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create new VM with minimal options
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -371,7 +371,7 @@ EXAMPLES = '''
|
|||
node: sabrewulf
|
||||
|
||||
- name: Create new VM with minimal options and given vmid
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -380,7 +380,7 @@ EXAMPLES = '''
|
|||
vmid: 100
|
||||
|
||||
- name: Create new VM with two network interface options
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -389,7 +389,7 @@ EXAMPLES = '''
|
|||
net: '{"net0":"virtio,bridge=vmbr1,rate=200", "net1":"e1000,bridge=vmbr2,"}'
|
||||
|
||||
- name: Create new VM with one network interface, three virto hard disk, 4 cores, and 2 vcpus
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -404,7 +404,7 @@ EXAMPLES = '''
|
|||
Clone VM with only source VM name.
|
||||
The VM source is spynal.
|
||||
The target VM name is zavala
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -416,7 +416,7 @@ EXAMPLES = '''
|
|||
timeout: 500
|
||||
|
||||
- name: Clone VM with source vmid and target newid and raw format
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -430,7 +430,7 @@ EXAMPLES = '''
|
|||
timeout: 300
|
||||
|
||||
- name: Create new VM and lock it for snapashot
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -439,7 +439,7 @@ EXAMPLES = '''
|
|||
lock: snapshot
|
||||
|
||||
- name: Create new VM and set protection to disable the remove VM and remove disk operations
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -448,7 +448,7 @@ EXAMPLES = '''
|
|||
protection: yes
|
||||
|
||||
- name: Start VM
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -457,7 +457,7 @@ EXAMPLES = '''
|
|||
state: started
|
||||
|
||||
- name: Stop VM
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -466,7 +466,7 @@ EXAMPLES = '''
|
|||
state: stopped
|
||||
|
||||
- name: Stop VM with force
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -476,7 +476,7 @@ EXAMPLES = '''
|
|||
force: yes
|
||||
|
||||
- name: Restart VM
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -485,7 +485,7 @@ EXAMPLES = '''
|
|||
state: restarted
|
||||
|
||||
- name: Remove VM
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -494,7 +494,7 @@ EXAMPLES = '''
|
|||
state: absent
|
||||
|
||||
- name: Get VM current state
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -503,7 +503,7 @@ EXAMPLES = '''
|
|||
state: current
|
||||
|
||||
- name: Update VM configuration
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -514,7 +514,7 @@ EXAMPLES = '''
|
|||
update: yes
|
||||
|
||||
- name: Delete QEMU parameters
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
@ -523,7 +523,7 @@ EXAMPLES = '''
|
|||
delete: 'args,template,cpulimit'
|
||||
|
||||
- name: Revert a pending change
|
||||
proxmox_kvm:
|
||||
community.general.proxmox_kvm:
|
||||
api_user: root@pam
|
||||
api_password: secret
|
||||
api_host: helldorado
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ author: Sergei Antipov (@UnderGreen)
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Upload new openvz template with minimal options
|
||||
proxmox_template:
|
||||
community.general.proxmox_template:
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
api_password: 1q2w3e
|
||||
|
|
@ -87,14 +87,14 @@ EXAMPLES = '''
|
|||
- name: >
|
||||
Upload new openvz template with minimal options use environment
|
||||
PROXMOX_PASSWORD variable(you should export it before)
|
||||
proxmox_template:
|
||||
community.general.proxmox_template:
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
api_host: node1
|
||||
src: ~/ubuntu-14.04-x86_64.tar.gz
|
||||
|
||||
- name: Upload new openvz template with all options and force overwrite
|
||||
proxmox_template:
|
||||
community.general.proxmox_template:
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
api_password: 1q2w3e
|
||||
|
|
@ -105,7 +105,7 @@ EXAMPLES = '''
|
|||
force: yes
|
||||
|
||||
- name: Delete template with minimal options
|
||||
proxmox_template:
|
||||
community.general.proxmox_template:
|
||||
node: uk-mc02
|
||||
api_user: root@pam
|
||||
api_password: 1q2w3e
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ vm:
|
|||
|
||||
EXAMPLES = r'''
|
||||
- name: Basic get info from VM
|
||||
rhevm:
|
||||
community.general.rhevm:
|
||||
server: rhevm01
|
||||
user: '{{ rhev.admin.name }}'
|
||||
password: '{{ rhev.admin.pass }}'
|
||||
|
|
@ -215,7 +215,7 @@ EXAMPLES = r'''
|
|||
state: info
|
||||
|
||||
- name: Basic create example from image
|
||||
rhevm:
|
||||
community.general.rhevm:
|
||||
server: rhevm01
|
||||
user: '{{ rhev.admin.name }}'
|
||||
password: '{{ rhev.admin.pass }}'
|
||||
|
|
@ -225,7 +225,7 @@ EXAMPLES = r'''
|
|||
state: present
|
||||
|
||||
- name: Power management
|
||||
rhevm:
|
||||
community.general.rhevm:
|
||||
server: rhevm01
|
||||
user: '{{ rhev.admin.name }}'
|
||||
password: '{{ rhev.admin.pass }}'
|
||||
|
|
@ -235,7 +235,7 @@ EXAMPLES = r'''
|
|||
state: down
|
||||
|
||||
- name: Multi disk, multi nic create example
|
||||
rhevm:
|
||||
community.general.rhevm:
|
||||
server: rhevm01
|
||||
user: '{{ rhev.admin.name }}'
|
||||
password: '{{ rhev.admin.pass }}'
|
||||
|
|
@ -275,7 +275,7 @@ EXAMPLES = r'''
|
|||
state: present
|
||||
|
||||
- name: Add a CD to the disk cd_drive
|
||||
rhevm:
|
||||
community.general.rhevm:
|
||||
user: '{{ rhev.admin.name }}'
|
||||
password: '{{ rhev.admin.pass }}'
|
||||
name: server007
|
||||
|
|
@ -283,7 +283,7 @@ EXAMPLES = r'''
|
|||
state: cd
|
||||
|
||||
- name: New host deployment + host network configuration
|
||||
rhevm:
|
||||
community.general.rhevm:
|
||||
password: '{{ rhevm.admin.pass }}'
|
||||
name: ovirt_node007
|
||||
type: host
|
||||
|
|
|
|||
|
|
@ -74,19 +74,19 @@ author:
|
|||
|
||||
EXAMPLES = r'''
|
||||
- name: Basic deploy of a service
|
||||
serverless:
|
||||
community.general.serverless:
|
||||
service_path: '{{ project_dir }}'
|
||||
state: present
|
||||
|
||||
- name: Deploy specific functions
|
||||
serverless:
|
||||
community.general.serverless:
|
||||
service_path: '{{ project_dir }}'
|
||||
functions:
|
||||
- my_func_one
|
||||
- my_func_two
|
||||
|
||||
- name: Deploy a project, then pull its resource list back into Ansible
|
||||
serverless:
|
||||
community.general.serverless:
|
||||
stage: dev
|
||||
region: us-east-1
|
||||
service_path: '{{ project_dir }}'
|
||||
|
|
@ -101,7 +101,7 @@ EXAMPLES = r'''
|
|||
stack_resources: true
|
||||
|
||||
- name: Deploy a project using a locally installed serverless binary
|
||||
serverless:
|
||||
community.general.serverless:
|
||||
stage: dev
|
||||
region: us-east-1
|
||||
service_path: '{{ project_dir }}'
|
||||
|
|
|
|||
|
|
@ -101,12 +101,12 @@ author: "Ryan Scott Brown (@ryansb)"
|
|||
|
||||
EXAMPLES = """
|
||||
- name: Basic deploy of a service
|
||||
terraform:
|
||||
community.general.terraform:
|
||||
project_path: '{{ project_dir }}'
|
||||
state: present
|
||||
|
||||
- name: Define the backend configuration at init
|
||||
terraform:
|
||||
community.general.terraform:
|
||||
project_path: 'project/'
|
||||
state: "{{ state }}"
|
||||
force_init: true
|
||||
|
|
@ -116,7 +116,7 @@ EXAMPLES = """
|
|||
key: "random.tfstate"
|
||||
|
||||
- name: Define the backend configuration with one or more files at init
|
||||
terraform:
|
||||
community.general.terraform:
|
||||
project_path: 'project/'
|
||||
state: "{{ state }}"
|
||||
force_init: true
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ options: {}
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Gather facts from xenserver
|
||||
xenserver_facts:
|
||||
community.general.xenserver_facts:
|
||||
|
||||
- name: Print running VMs
|
||||
debug:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue