mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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
|
@ -278,7 +278,7 @@ EXAMPLES = '''
|
|||
|
||||
tasks:
|
||||
- name: Launch ECS instance in VPC network
|
||||
ali_instance:
|
||||
community.general.ali_instance:
|
||||
alicloud_access_key: '{{ alicloud_access_key }}'
|
||||
alicloud_secret_key: '{{ alicloud_secret_key }}'
|
||||
alicloud_region: '{{ alicloud_region }}'
|
||||
|
@ -296,7 +296,7 @@ EXAMPLES = '''
|
|||
password: '{{ password }}'
|
||||
|
||||
- name: With count and count_tag to create a number of instances
|
||||
ali_instance:
|
||||
community.general.ali_instance:
|
||||
alicloud_access_key: '{{ alicloud_access_key }}'
|
||||
alicloud_secret_key: '{{ alicloud_secret_key }}'
|
||||
alicloud_region: '{{ alicloud_region }}'
|
||||
|
@ -318,7 +318,7 @@ EXAMPLES = '''
|
|||
password: '{{ password }}'
|
||||
|
||||
- name: Start instance
|
||||
ali_instance:
|
||||
community.general.ali_instance:
|
||||
alicloud_access_key: '{{ alicloud_access_key }}'
|
||||
alicloud_secret_key: '{{ alicloud_secret_key }}'
|
||||
alicloud_region: '{{ alicloud_region }}'
|
||||
|
|
|
@ -82,23 +82,23 @@ EXAMPLES = '''
|
|||
# Fetch instances details according to setting different filters
|
||||
|
||||
- name: Find all instances in the specified region
|
||||
ali_instance_info:
|
||||
community.general.ali_instance_info:
|
||||
register: all_instances
|
||||
|
||||
- name: Find all instances based on the specified ids
|
||||
ali_instance_info:
|
||||
community.general.ali_instance_info:
|
||||
instance_ids:
|
||||
- "i-35b333d9"
|
||||
- "i-ddav43kd"
|
||||
register: instances_by_ids
|
||||
|
||||
- name: Find all instances based on the specified name_prefix
|
||||
ali_instance_info:
|
||||
community.general.ali_instance_info:
|
||||
name_prefix: "ecs_instance_"
|
||||
register: instances_by_name_prefix
|
||||
|
||||
- name: Find instances based on tags
|
||||
ali_instance_info:
|
||||
community.general.ali_instance_info:
|
||||
tags:
|
||||
Test: "add"
|
||||
'''
|
||||
|
|
|
@ -58,7 +58,7 @@ options:
|
|||
EXAMPLES = '''
|
||||
|
||||
- name: Install the etcd system container
|
||||
atomic_container:
|
||||
community.general.atomic_container:
|
||||
name: etcd
|
||||
image: rhel/etcd
|
||||
backend: ostree
|
||||
|
@ -68,7 +68,7 @@ EXAMPLES = '''
|
|||
- ETCD_NAME=etcd.server
|
||||
|
||||
- name: Uninstall the etcd system container
|
||||
atomic_container:
|
||||
community.general.atomic_container:
|
||||
name: etcd
|
||||
image: rhel/etcd
|
||||
backend: ostree
|
||||
|
|
|
@ -31,11 +31,11 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Upgrade the atomic host platform to the latest version (atomic host upgrade)
|
||||
atomic_host:
|
||||
community.general.atomic_host:
|
||||
revision: latest
|
||||
|
||||
- name: Deploy a specific revision as the atomic host (atomic host deploy 23.130)
|
||||
atomic_host:
|
||||
community.general.atomic_host:
|
||||
revision: 23.130
|
||||
'''
|
||||
|
||||
|
|
|
@ -45,12 +45,12 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Execute the run command on rsyslog container image (atomic run rhel7/rsyslog)
|
||||
atomic_image:
|
||||
community.general.atomic_image:
|
||||
name: rhel7/rsyslog
|
||||
state: latest
|
||||
|
||||
- name: Pull busybox to the OSTree backend
|
||||
atomic_image:
|
||||
community.general.atomic_image:
|
||||
name: busybox
|
||||
state: latest
|
||||
backend: ostree
|
||||
|
|
|
@ -58,7 +58,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Create an Anti Affinity Policy
|
||||
clc_aa_policy:
|
||||
community.general.clc_aa_policy:
|
||||
name: Hammer Time
|
||||
location: UK3
|
||||
state: present
|
||||
|
@ -75,7 +75,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Delete an Anti Affinity Policy
|
||||
clc_aa_policy:
|
||||
community.general.clc_aa_policy:
|
||||
name: Hammer Time
|
||||
location: UK3
|
||||
state: absent
|
||||
|
|
|
@ -74,7 +74,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Create an Alert Policy for disk above 80% for 5 minutes
|
||||
clc_alert_policy:
|
||||
community.general.clc_alert_policy:
|
||||
alias: wfad
|
||||
name: 'alert for disk > 80%'
|
||||
alert_recipients:
|
||||
|
@ -96,7 +96,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Delete an Alert Policy
|
||||
clc_alert_policy:
|
||||
community.general.clc_alert_policy:
|
||||
alias: wfad
|
||||
name: 'alert for disk > 80%'
|
||||
state: absent
|
||||
|
|
|
@ -59,7 +59,7 @@ EXAMPLES = '''
|
|||
# Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples
|
||||
|
||||
- name: Deploy package
|
||||
clc_blueprint_package:
|
||||
community.general.clc_blueprint_package:
|
||||
server_ids:
|
||||
- UC1TEST-SERVER1
|
||||
- UC1TEST-SERVER2
|
||||
|
|
|
@ -70,7 +70,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Create / Verify a Server Group at CenturyLink Cloud
|
||||
clc_group:
|
||||
community.general.clc_group:
|
||||
name: My Cool Server Group
|
||||
parent: Default Group
|
||||
state: present
|
||||
|
@ -89,7 +89,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Delete / Verify Absent a Server Group at CenturyLink Cloud
|
||||
clc_group:
|
||||
community.general.clc_group:
|
||||
name: My Cool Server Group
|
||||
parent: Default Group
|
||||
state: absent
|
||||
|
|
|
@ -79,7 +79,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Actually Create things
|
||||
clc_loadbalancer:
|
||||
community.general.clc_loadbalancer:
|
||||
name: test
|
||||
description: test
|
||||
alias: TEST
|
||||
|
@ -95,7 +95,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Actually Create things
|
||||
clc_loadbalancer:
|
||||
community.general.clc_loadbalancer:
|
||||
name: test
|
||||
description: test
|
||||
alias: TEST
|
||||
|
@ -111,7 +111,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Actually Create things
|
||||
clc_loadbalancer:
|
||||
community.general.clc_loadbalancer:
|
||||
name: test
|
||||
description: test
|
||||
alias: TEST
|
||||
|
@ -127,7 +127,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Actually Delete things
|
||||
clc_loadbalancer:
|
||||
community.general.clc_loadbalancer:
|
||||
name: test
|
||||
description: test
|
||||
alias: TEST
|
||||
|
@ -143,7 +143,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Actually Delete things
|
||||
clc_loadbalancer:
|
||||
community.general.clc_loadbalancer:
|
||||
name: test
|
||||
description: test
|
||||
alias: TEST
|
||||
|
|
|
@ -70,7 +70,7 @@ EXAMPLES = '''
|
|||
# Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples
|
||||
|
||||
- name: Set the cpu count to 4 on a server
|
||||
clc_modify_server:
|
||||
community.general.clc_modify_server:
|
||||
server_ids:
|
||||
- UC1TESTSVR01
|
||||
- UC1TESTSVR02
|
||||
|
@ -78,7 +78,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Set the memory to 8GB on a server
|
||||
clc_modify_server:
|
||||
community.general.clc_modify_server:
|
||||
server_ids:
|
||||
- UC1TESTSVR01
|
||||
- UC1TESTSVR02
|
||||
|
@ -86,7 +86,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Set the anti affinity policy on a server
|
||||
clc_modify_server:
|
||||
community.general.clc_modify_server:
|
||||
server_ids:
|
||||
- UC1TESTSVR01
|
||||
- UC1TESTSVR02
|
||||
|
@ -94,7 +94,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Remove the anti affinity policy on a server
|
||||
clc_modify_server:
|
||||
community.general.clc_modify_server:
|
||||
server_ids:
|
||||
- UC1TESTSVR01
|
||||
- UC1TESTSVR02
|
||||
|
@ -102,7 +102,7 @@ EXAMPLES = '''
|
|||
state: absent
|
||||
|
||||
- name: Add the alert policy on a server
|
||||
clc_modify_server:
|
||||
community.general.clc_modify_server:
|
||||
server_ids:
|
||||
- UC1TESTSVR01
|
||||
- UC1TESTSVR02
|
||||
|
@ -110,7 +110,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Remove the alert policy on a server
|
||||
clc_modify_server:
|
||||
community.general.clc_modify_server:
|
||||
server_ids:
|
||||
- UC1TESTSVR01
|
||||
- UC1TESTSVR02
|
||||
|
@ -118,7 +118,7 @@ EXAMPLES = '''
|
|||
state: absent
|
||||
|
||||
- name: Ret the memory to 16GB and cpu to 8 core on a lust if servers
|
||||
clc_modify_server:
|
||||
community.general.clc_modify_server:
|
||||
server_ids:
|
||||
- UC1TESTSVR01
|
||||
- UC1TESTSVR02
|
||||
|
|
|
@ -62,7 +62,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Create Public IP For Servers
|
||||
clc_publicip:
|
||||
community.general.clc_publicip:
|
||||
protocol: TCP
|
||||
ports:
|
||||
- 80
|
||||
|
@ -82,7 +82,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Create Public IP For Servers
|
||||
clc_publicip:
|
||||
community.general.clc_publicip:
|
||||
server_ids:
|
||||
- UC1TEST-SVR01
|
||||
- UC1TEST-SVR02
|
||||
|
|
|
@ -175,7 +175,7 @@ EXAMPLES = '''
|
|||
# Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples
|
||||
|
||||
- name: Provision a single Ubuntu Server
|
||||
clc_server:
|
||||
community.general.clc_server:
|
||||
name: test
|
||||
template: ubuntu-14-64
|
||||
count: 1
|
||||
|
@ -183,7 +183,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Ensure 'Default Group' has exactly 5 servers
|
||||
clc_server:
|
||||
community.general.clc_server:
|
||||
name: test
|
||||
template: ubuntu-14-64
|
||||
exact_count: 5
|
||||
|
@ -191,19 +191,19 @@ EXAMPLES = '''
|
|||
group: Default Group
|
||||
|
||||
- name: Stop a Server
|
||||
clc_server:
|
||||
community.general.clc_server:
|
||||
server_ids:
|
||||
- UC1ACCT-TEST01
|
||||
state: stopped
|
||||
|
||||
- name: Start a Server
|
||||
clc_server:
|
||||
community.general.clc_server:
|
||||
server_ids:
|
||||
- UC1ACCT-TEST01
|
||||
state: started
|
||||
|
||||
- name: Delete a Server
|
||||
clc_server:
|
||||
community.general.clc_server:
|
||||
server_ids:
|
||||
- UC1ACCT-TEST01
|
||||
state: absent
|
||||
|
|
|
@ -55,7 +55,7 @@ EXAMPLES = '''
|
|||
# Note - You must set the CLC_V2_API_USERNAME And CLC_V2_API_PASSWD Environment variables before running these examples
|
||||
|
||||
- name: Create server snapshot
|
||||
clc_server_snapshot:
|
||||
community.general.clc_server_snapshot:
|
||||
server_ids:
|
||||
- UC1TEST-SVR01
|
||||
- UC1TEST-SVR02
|
||||
|
@ -64,7 +64,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Restore server snapshot
|
||||
clc_server_snapshot:
|
||||
community.general.clc_server_snapshot:
|
||||
server_ids:
|
||||
- UC1TEST-SVR01
|
||||
- UC1TEST-SVR02
|
||||
|
@ -72,7 +72,7 @@ EXAMPLES = '''
|
|||
state: restore
|
||||
|
||||
- name: Delete server snapshot
|
||||
clc_server_snapshot:
|
||||
community.general.clc_server_snapshot:
|
||||
server_ids:
|
||||
- UC1TEST-SVR01
|
||||
- UC1TEST-SVR02
|
||||
|
|
|
@ -48,13 +48,13 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create an MCP 1.0 network
|
||||
dimensiondata_network:
|
||||
community.general.dimensiondata_network:
|
||||
region: na
|
||||
location: NA5
|
||||
name: mynet
|
||||
|
||||
- name: Create an MCP 2.0 network
|
||||
dimensiondata_network:
|
||||
community.general.dimensiondata_network:
|
||||
region: na
|
||||
mcp_user: my_user
|
||||
mcp_password: my_password
|
||||
|
@ -63,7 +63,7 @@ EXAMPLES = '''
|
|||
service_plan: ADVANCED
|
||||
|
||||
- name: Delete a network
|
||||
dimensiondata_network:
|
||||
community.general.dimensiondata_network:
|
||||
region: na
|
||||
location: NA1
|
||||
name: mynet
|
||||
|
|
|
@ -70,7 +70,7 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Add or update VLAN
|
||||
dimensiondata_vlan:
|
||||
community.general.dimensiondata_vlan:
|
||||
region: na
|
||||
location: NA5
|
||||
network_domain: test_network
|
||||
|
@ -82,7 +82,7 @@ EXAMPLES = '''
|
|||
wait: yes
|
||||
|
||||
- name: Read / get VLAN details
|
||||
dimensiondata_vlan:
|
||||
community.general.dimensiondata_vlan:
|
||||
region: na
|
||||
location: NA5
|
||||
network_domain: test_network
|
||||
|
@ -91,7 +91,7 @@ EXAMPLES = '''
|
|||
wait: yes
|
||||
|
||||
- name: Delete a VLAN
|
||||
dimensiondata_vlan:
|
||||
community.general.dimensiondata_vlan:
|
||||
region: na
|
||||
location: NA5
|
||||
network_domain: test_network
|
||||
|
|
|
@ -168,12 +168,12 @@ EXAMPLES = '''
|
|||
gather_facts: no
|
||||
tasks:
|
||||
- name: Tear down existing services
|
||||
docker_compose:
|
||||
community.general.docker_compose:
|
||||
project_src: flask
|
||||
state: absent
|
||||
|
||||
- name: Create and start services
|
||||
docker_compose:
|
||||
community.general.docker_compose:
|
||||
project_src: flask
|
||||
register: output
|
||||
|
||||
|
@ -181,7 +181,7 @@ EXAMPLES = '''
|
|||
var: output
|
||||
|
||||
- name: Run `docker-compose up` again
|
||||
docker_compose:
|
||||
community.general.docker_compose:
|
||||
project_src: flask
|
||||
build: no
|
||||
register: output
|
||||
|
@ -193,7 +193,7 @@ EXAMPLES = '''
|
|||
that: "not output.changed "
|
||||
|
||||
- name: Stop all services
|
||||
docker_compose:
|
||||
community.general.docker_compose:
|
||||
project_src: flask
|
||||
build: no
|
||||
stopped: yes
|
||||
|
@ -208,7 +208,7 @@ EXAMPLES = '''
|
|||
- "not db.flask_db_1.state.running"
|
||||
|
||||
- name: Restart services
|
||||
docker_compose:
|
||||
community.general.docker_compose:
|
||||
project_src: flask
|
||||
build: no
|
||||
restarted: yes
|
||||
|
@ -226,7 +226,7 @@ EXAMPLES = '''
|
|||
hosts: localhost
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- docker_compose:
|
||||
- community.general.docker_compose:
|
||||
project_src: flask
|
||||
scale:
|
||||
web: 2
|
||||
|
@ -239,11 +239,11 @@ EXAMPLES = '''
|
|||
hosts: localhost
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- docker_compose:
|
||||
- community.general.docker_compose:
|
||||
project_src: flask
|
||||
state: absent
|
||||
|
||||
- docker_compose:
|
||||
- community.general.docker_compose:
|
||||
project_name: flask
|
||||
definition:
|
||||
version: '2'
|
||||
|
@ -273,11 +273,11 @@ EXAMPLES = '''
|
|||
hosts: localhost
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- docker_compose:
|
||||
- community.general.docker_compose:
|
||||
project_src: flask
|
||||
state: absent
|
||||
|
||||
- docker_compose:
|
||||
- community.general.docker_compose:
|
||||
project_name: flask
|
||||
definition:
|
||||
db:
|
||||
|
|
|
@ -75,7 +75,7 @@ author:
|
|||
EXAMPLES = '''
|
||||
|
||||
- name: Create config foo (from a file on the control machine)
|
||||
docker_config:
|
||||
community.general.docker_config:
|
||||
name: foo
|
||||
# If the file is JSON or binary, Ansible might modify it (because
|
||||
# it is first decoded and later re-encoded). Base64-encoding the
|
||||
|
@ -85,7 +85,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Change the config data
|
||||
docker_config:
|
||||
community.general.docker_config:
|
||||
name: foo
|
||||
data: Goodnight everyone!
|
||||
labels:
|
||||
|
@ -94,7 +94,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Add a new label
|
||||
docker_config:
|
||||
community.general.docker_config:
|
||||
name: foo
|
||||
data: Goodnight everyone!
|
||||
labels:
|
||||
|
@ -105,7 +105,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: No change
|
||||
docker_config:
|
||||
community.general.docker_config:
|
||||
name: foo
|
||||
data: Goodnight everyone!
|
||||
labels:
|
||||
|
@ -115,7 +115,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Update an existing label
|
||||
docker_config:
|
||||
community.general.docker_config:
|
||||
name: foo
|
||||
data: Goodnight everyone!
|
||||
labels:
|
||||
|
@ -124,14 +124,14 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Force the (re-)creation of the config
|
||||
docker_config:
|
||||
community.general.docker_config:
|
||||
name: foo
|
||||
data: Goodnight everyone!
|
||||
force: yes
|
||||
state: present
|
||||
|
||||
- name: Remove config foo
|
||||
docker_config:
|
||||
community.general.docker_config:
|
||||
name: foo
|
||||
state: absent
|
||||
'''
|
||||
|
|
|
@ -830,14 +830,14 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a data container
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: mydata
|
||||
image: busybox
|
||||
volumes:
|
||||
- /data
|
||||
|
||||
- name: Re-create a redis container
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: myredis
|
||||
image: redis
|
||||
command: redis-server --appendonly yes
|
||||
|
@ -849,7 +849,7 @@ EXAMPLES = '''
|
|||
- mydata
|
||||
|
||||
- name: Restart a container
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: myapplication
|
||||
image: someuser/appimage
|
||||
state: started
|
||||
|
@ -876,19 +876,19 @@ EXAMPLES = '''
|
|||
BOOLEAN_KEY: "yes"
|
||||
|
||||
- name: Container present
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: mycontainer
|
||||
state: present
|
||||
image: ubuntu:14.04
|
||||
command: sleep infinity
|
||||
|
||||
- name: Stop a container
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: mycontainer
|
||||
state: stopped
|
||||
|
||||
- name: Start 4 load-balanced containers
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: "container{{ item }}"
|
||||
recreate: yes
|
||||
image: someuser/anotherappimage
|
||||
|
@ -896,12 +896,12 @@ EXAMPLES = '''
|
|||
with_sequence: count=4
|
||||
|
||||
- name: Remove container
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: ohno
|
||||
state: absent
|
||||
|
||||
- name: Syslogging output
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: myservice
|
||||
image: busybox
|
||||
log_driver: syslog
|
||||
|
@ -913,14 +913,14 @@ EXAMPLES = '''
|
|||
tag: myservice
|
||||
|
||||
- name: Create db container and connect to network
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: db_test
|
||||
image: "postgres:latest"
|
||||
networks:
|
||||
- name: "{{ docker_network_name }}"
|
||||
|
||||
- name: Start container, connect to network and link
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: sleeper
|
||||
image: ubuntu:14.04
|
||||
networks:
|
||||
|
@ -933,13 +933,13 @@ EXAMPLES = '''
|
|||
- name: TestingNet2
|
||||
|
||||
- name: Start a container with a command
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: sleepy
|
||||
image: ubuntu:14.04
|
||||
command: ["sleep", "infinity"]
|
||||
|
||||
- name: Add container to networks
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: sleepy
|
||||
networks:
|
||||
- name: TestingNet
|
||||
|
@ -950,7 +950,7 @@ EXAMPLES = '''
|
|||
ipv4_address: 172.1.10.20
|
||||
|
||||
- name: Update network with aliases
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: sleepy
|
||||
networks:
|
||||
- name: TestingNet
|
||||
|
@ -959,25 +959,25 @@ EXAMPLES = '''
|
|||
- zzzz
|
||||
|
||||
- name: Remove container from one network
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: sleepy
|
||||
networks:
|
||||
- name: TestingNet2
|
||||
purge_networks: yes
|
||||
|
||||
- name: Remove container from all networks
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: sleepy
|
||||
purge_networks: yes
|
||||
|
||||
- name: Start a container and use an env file
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: agent
|
||||
image: jenkinsci/ssh-slave
|
||||
env_file: /var/tmp/jenkins/agent.env
|
||||
|
||||
- name: Create a container with limited capabilities
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: sleepy
|
||||
image: ubuntu:16.04
|
||||
command: sleep infinity
|
||||
|
@ -987,7 +987,7 @@ EXAMPLES = '''
|
|||
- all
|
||||
|
||||
- name: Finer container restart/update control
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: test
|
||||
image: ubuntu:18.04
|
||||
env:
|
||||
|
@ -1001,7 +1001,7 @@ EXAMPLES = '''
|
|||
volumes: allow_more_present # if there are more volumes, that's ok, as long as `/tmp:/tmp` is there
|
||||
|
||||
- name: Finer container restart/update control II
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: test
|
||||
image: ubuntu:18.04
|
||||
env:
|
||||
|
@ -1012,7 +1012,7 @@ EXAMPLES = '''
|
|||
env: strict # except for environment variables; there, we want to be strict
|
||||
|
||||
- name: Start container with healthstatus
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: nginx-proxy
|
||||
image: nginx:1.13
|
||||
state: started
|
||||
|
@ -1026,7 +1026,7 @@ EXAMPLES = '''
|
|||
start_period: 30s
|
||||
|
||||
- name: Remove healthcheck from container
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: nginx-proxy
|
||||
image: nginx:1.13
|
||||
state: started
|
||||
|
@ -1035,7 +1035,7 @@ EXAMPLES = '''
|
|||
test: ["NONE"]
|
||||
|
||||
- name: Start container with block device read limit
|
||||
docker_container:
|
||||
community.general.docker_container:
|
||||
name: test
|
||||
image: ubuntu:18.04
|
||||
state: started
|
||||
|
|
|
@ -41,7 +41,7 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Get infos on container
|
||||
docker_container_info:
|
||||
community.general.docker_container_info:
|
||||
name: mydata
|
||||
register: result
|
||||
|
||||
|
|
|
@ -100,29 +100,29 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Get info on docker host
|
||||
docker_host_info:
|
||||
community.general.docker_host_info:
|
||||
register: result
|
||||
|
||||
- name: Get info on docker host and list images
|
||||
docker_host_info:
|
||||
community.general.docker_host_info:
|
||||
images: yes
|
||||
register: result
|
||||
|
||||
- name: Get info on docker host and list images matching the filter
|
||||
docker_host_info:
|
||||
community.general.docker_host_info:
|
||||
images: yes
|
||||
images_filters:
|
||||
label: "mylabel"
|
||||
register: result
|
||||
|
||||
- name: Get info on docker host and verbose list images
|
||||
docker_host_info:
|
||||
community.general.docker_host_info:
|
||||
images: yes
|
||||
verbose_output: yes
|
||||
register: result
|
||||
|
||||
- name: Get info on docker host and used disk space
|
||||
docker_host_info:
|
||||
community.general.docker_host_info:
|
||||
disk_usage: yes
|
||||
register: result
|
||||
|
||||
|
|
|
@ -313,19 +313,19 @@ author:
|
|||
EXAMPLES = '''
|
||||
|
||||
- name: Pull an image
|
||||
docker_image:
|
||||
community.general.docker_image:
|
||||
name: pacur/centos-7
|
||||
source: pull
|
||||
|
||||
- name: Tag and push to docker hub
|
||||
docker_image:
|
||||
community.general.docker_image:
|
||||
name: pacur/centos-7:56
|
||||
repository: dcoppenhagan/myimage:7.56
|
||||
push: yes
|
||||
source: local
|
||||
|
||||
- name: Tag and push to local registry
|
||||
docker_image:
|
||||
community.general.docker_image:
|
||||
# Image will be centos:7
|
||||
name: centos
|
||||
# Will be pushed to localhost:5000/centos:7
|
||||
|
@ -335,7 +335,7 @@ EXAMPLES = '''
|
|||
source: local
|
||||
|
||||
- name: Add tag latest to image
|
||||
docker_image:
|
||||
community.general.docker_image:
|
||||
name: myimage:7.1.2
|
||||
repository: myimage:latest
|
||||
# As 'latest' usually already is present, we need to enable overwriting of existing tags:
|
||||
|
@ -343,13 +343,13 @@ EXAMPLES = '''
|
|||
source: local
|
||||
|
||||
- name: Remove image
|
||||
docker_image:
|
||||
community.general.docker_image:
|
||||
state: absent
|
||||
name: registry.ansible.com/chouseknecht/sinatra
|
||||
tag: v1
|
||||
|
||||
- name: Build an image and push it to a private repo
|
||||
docker_image:
|
||||
community.general.docker_image:
|
||||
build:
|
||||
path: ./sinatra
|
||||
name: registry.ansible.com/chouseknecht/sinatra
|
||||
|
@ -358,14 +358,14 @@ EXAMPLES = '''
|
|||
source: build
|
||||
|
||||
- name: Archive image
|
||||
docker_image:
|
||||
community.general.docker_image:
|
||||
name: registry.ansible.com/chouseknecht/sinatra
|
||||
tag: v1
|
||||
archive_path: my_sinatra.tar
|
||||
source: local
|
||||
|
||||
- name: Load image from archive and push to a private registry
|
||||
docker_image:
|
||||
community.general.docker_image:
|
||||
name: localhost:5000/myimages/sinatra
|
||||
tag: v1
|
||||
push: yes
|
||||
|
@ -373,7 +373,7 @@ EXAMPLES = '''
|
|||
source: load
|
||||
|
||||
- name: Build image and with build args
|
||||
docker_image:
|
||||
community.general.docker_image:
|
||||
name: myimage
|
||||
build:
|
||||
path: /path/to/build/dir
|
||||
|
@ -383,7 +383,7 @@ EXAMPLES = '''
|
|||
source: build
|
||||
|
||||
- name: Build image using cache source
|
||||
docker_image:
|
||||
community.general.docker_image:
|
||||
name: myimage:latest
|
||||
build:
|
||||
path: /path/to/build/dir
|
||||
|
|
|
@ -51,11 +51,11 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Inspect a single image
|
||||
docker_image_info:
|
||||
community.general.docker_image_info:
|
||||
name: pacur/centos-7
|
||||
|
||||
- name: Inspect multiple images
|
||||
docker_image_info:
|
||||
community.general.docker_image_info:
|
||||
name:
|
||||
- pacur/centos-7
|
||||
- sinatra
|
||||
|
|
|
@ -86,25 +86,25 @@ author:
|
|||
EXAMPLES = '''
|
||||
|
||||
- name: Log into DockerHub
|
||||
docker_login:
|
||||
community.general.docker_login:
|
||||
username: docker
|
||||
password: rekcod
|
||||
|
||||
- name: Log into private registry and force re-authorization
|
||||
docker_login:
|
||||
community.general.docker_login:
|
||||
registry_url: your.private.registry.io
|
||||
username: yourself
|
||||
password: secrets3
|
||||
reauthorize: yes
|
||||
|
||||
- name: Log into DockerHub using a custom config file
|
||||
docker_login:
|
||||
community.general.docker_login:
|
||||
username: docker
|
||||
password: rekcod
|
||||
config_path: /tmp/.mydockercfg
|
||||
|
||||
- name: Log out of DockerHub
|
||||
docker_login:
|
||||
community.general.docker_login:
|
||||
state: absent
|
||||
'''
|
||||
|
||||
|
|
|
@ -197,11 +197,11 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a network
|
||||
docker_network:
|
||||
community.general.docker_network:
|
||||
name: network_one
|
||||
|
||||
- name: Remove all but selected list of containers
|
||||
docker_network:
|
||||
community.general.docker_network:
|
||||
name: network_one
|
||||
connected:
|
||||
- container_a
|
||||
|
@ -209,25 +209,25 @@ EXAMPLES = '''
|
|||
- container_c
|
||||
|
||||
- name: Remove a single container
|
||||
docker_network:
|
||||
community.general.docker_network:
|
||||
name: network_one
|
||||
connected: "{{ fulllist|difference(['container_a']) }}"
|
||||
|
||||
- name: Add a container to a network, leaving existing containers connected
|
||||
docker_network:
|
||||
community.general.docker_network:
|
||||
name: network_one
|
||||
connected:
|
||||
- container_a
|
||||
appends: yes
|
||||
|
||||
- name: Create a network with driver options
|
||||
docker_network:
|
||||
community.general.docker_network:
|
||||
name: network_two
|
||||
driver_options:
|
||||
com.docker.network.bridge.name: net2
|
||||
|
||||
- name: Create a network with custom IPAM config
|
||||
docker_network:
|
||||
community.general.docker_network:
|
||||
name: network_three
|
||||
ipam_config:
|
||||
- subnet: 172.3.27.0/24
|
||||
|
@ -238,21 +238,21 @@ EXAMPLES = '''
|
|||
host2: 172.3.27.4
|
||||
|
||||
- name: Create a network with labels
|
||||
docker_network:
|
||||
community.general.docker_network:
|
||||
name: network_four
|
||||
labels:
|
||||
key1: value1
|
||||
key2: value2
|
||||
|
||||
- name: Create a network with IPv6 IPAM config
|
||||
docker_network:
|
||||
community.general.docker_network:
|
||||
name: network_ipv6_one
|
||||
enable_ipv6: yes
|
||||
ipam_config:
|
||||
- subnet: fdd1:ac8c:0557:7ce1::/64
|
||||
|
||||
- name: Create a network with IPv6 and custom IPv4 IPAM config
|
||||
docker_network:
|
||||
community.general.docker_network:
|
||||
name: network_ipv6_two
|
||||
enable_ipv6: yes
|
||||
ipam_config:
|
||||
|
@ -260,7 +260,7 @@ EXAMPLES = '''
|
|||
- subnet: fdd1:ac8c:0557:7ce2::/64
|
||||
|
||||
- name: Delete a network, disconnecting all containers
|
||||
docker_network:
|
||||
community.general.docker_network:
|
||||
name: network_one
|
||||
state: absent
|
||||
force: yes
|
||||
|
|
|
@ -41,7 +41,7 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Get infos on network
|
||||
docker_network_info:
|
||||
community.general.docker_network_info:
|
||||
name: mydata
|
||||
register: result
|
||||
|
||||
|
|
|
@ -83,35 +83,35 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Set node role
|
||||
docker_node:
|
||||
community.general.docker_node:
|
||||
hostname: mynode
|
||||
role: manager
|
||||
|
||||
- name: Set node availability
|
||||
docker_node:
|
||||
community.general.docker_node:
|
||||
hostname: mynode
|
||||
availability: drain
|
||||
|
||||
- name: Replace node labels with new labels
|
||||
docker_node:
|
||||
community.general.docker_node:
|
||||
hostname: mynode
|
||||
labels:
|
||||
key: value
|
||||
labels_state: replace
|
||||
|
||||
- name: Merge node labels and new labels
|
||||
docker_node:
|
||||
community.general.docker_node:
|
||||
hostname: mynode
|
||||
labels:
|
||||
key: value
|
||||
|
||||
- name: Remove all labels assigned to node
|
||||
docker_node:
|
||||
community.general.docker_node:
|
||||
hostname: mynode
|
||||
labels_state: replace
|
||||
|
||||
- name: Remove selected labels from the node
|
||||
docker_node:
|
||||
community.general.docker_node:
|
||||
hostname: mynode
|
||||
labels_to_remove:
|
||||
- key1
|
||||
|
|
|
@ -51,23 +51,23 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Get info on all nodes
|
||||
docker_node_info:
|
||||
community.general.docker_node_info:
|
||||
register: result
|
||||
|
||||
- name: Get info on node
|
||||
docker_node_info:
|
||||
community.general.docker_node_info:
|
||||
name: mynode
|
||||
register: result
|
||||
|
||||
- name: Get info on list of nodes
|
||||
docker_node_info:
|
||||
community.general.docker_node_info:
|
||||
name:
|
||||
- mynode1
|
||||
- mynode2
|
||||
register: result
|
||||
|
||||
- name: Get info on host if it is Swarm Manager
|
||||
docker_node_info:
|
||||
community.general.docker_node_info:
|
||||
self: true
|
||||
register: result
|
||||
'''
|
||||
|
|
|
@ -87,14 +87,14 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Prune containers older than 24h
|
||||
docker_prune:
|
||||
community.general.docker_prune:
|
||||
containers: yes
|
||||
containers_filters:
|
||||
# only consider containers created more than 24 hours ago
|
||||
until: 24h
|
||||
|
||||
- name: Prune everything
|
||||
docker_prune:
|
||||
community.general.docker_prune:
|
||||
containers: yes
|
||||
images: yes
|
||||
networks: yes
|
||||
|
@ -102,7 +102,7 @@ EXAMPLES = '''
|
|||
builder_cache: yes
|
||||
|
||||
- name: Prune everything (including non-dangling images)
|
||||
docker_prune:
|
||||
community.general.docker_prune:
|
||||
containers: yes
|
||||
images: yes
|
||||
images_filters:
|
||||
|
|
|
@ -74,7 +74,7 @@ author:
|
|||
EXAMPLES = '''
|
||||
|
||||
- name: Create secret foo (from a file on the control machine)
|
||||
docker_secret:
|
||||
community.general.docker_secret:
|
||||
name: foo
|
||||
# If the file is JSON or binary, Ansible might modify it (because
|
||||
# it is first decoded and later re-encoded). Base64-encoding the
|
||||
|
@ -84,7 +84,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Change the secret data
|
||||
docker_secret:
|
||||
community.general.docker_secret:
|
||||
name: foo
|
||||
data: Goodnight everyone!
|
||||
labels:
|
||||
|
@ -93,7 +93,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Add a new label
|
||||
docker_secret:
|
||||
community.general.docker_secret:
|
||||
name: foo
|
||||
data: Goodnight everyone!
|
||||
labels:
|
||||
|
@ -104,7 +104,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: No change
|
||||
docker_secret:
|
||||
community.general.docker_secret:
|
||||
name: foo
|
||||
data: Goodnight everyone!
|
||||
labels:
|
||||
|
@ -114,7 +114,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Update an existing label
|
||||
docker_secret:
|
||||
community.general.docker_secret:
|
||||
name: foo
|
||||
data: Goodnight everyone!
|
||||
labels:
|
||||
|
@ -123,14 +123,14 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Force the removal/creation of the secret
|
||||
docker_secret:
|
||||
community.general.docker_secret:
|
||||
name: foo
|
||||
data: Goodnight everyone!
|
||||
force: yes
|
||||
state: present
|
||||
|
||||
- name: Remove secret foo
|
||||
docker_secret:
|
||||
community.general.docker_secret:
|
||||
name: foo
|
||||
state: absent
|
||||
'''
|
||||
|
|
|
@ -96,14 +96,14 @@ stack_spec_diff:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Deploy stack from a compose file
|
||||
docker_stack:
|
||||
community.general.docker_stack:
|
||||
state: present
|
||||
name: mystack
|
||||
compose:
|
||||
- /opt/docker-compose.yml
|
||||
|
||||
- name: Deploy stack from base compose file and override the web service
|
||||
docker_stack:
|
||||
community.general.docker_stack:
|
||||
state: present
|
||||
name: mystack
|
||||
compose:
|
||||
|
@ -116,7 +116,7 @@ EXAMPLES = '''
|
|||
ENVVAR: envvar
|
||||
|
||||
- name: Remove stack
|
||||
docker_stack:
|
||||
community.general.docker_stack:
|
||||
name: mystack
|
||||
state: absent
|
||||
'''
|
||||
|
|
|
@ -190,37 +190,37 @@ author:
|
|||
EXAMPLES = '''
|
||||
|
||||
- name: Init a new swarm with default parameters
|
||||
docker_swarm:
|
||||
community.general.docker_swarm:
|
||||
state: present
|
||||
|
||||
- name: Update swarm configuration
|
||||
docker_swarm:
|
||||
community.general.docker_swarm:
|
||||
state: present
|
||||
election_tick: 5
|
||||
|
||||
- name: Add nodes
|
||||
docker_swarm:
|
||||
community.general.docker_swarm:
|
||||
state: join
|
||||
advertise_addr: 192.168.1.2
|
||||
join_token: SWMTKN-1--xxxxx
|
||||
remote_addrs: [ '192.168.1.1:2377' ]
|
||||
|
||||
- name: Leave swarm for a node
|
||||
docker_swarm:
|
||||
community.general.docker_swarm:
|
||||
state: absent
|
||||
|
||||
- name: Remove a swarm manager
|
||||
docker_swarm:
|
||||
community.general.docker_swarm:
|
||||
state: absent
|
||||
force: true
|
||||
|
||||
- name: Remove node from swarm
|
||||
docker_swarm:
|
||||
community.general.docker_swarm:
|
||||
state: remove
|
||||
node_id: mynode
|
||||
|
||||
- name: Inspect swarm
|
||||
docker_swarm:
|
||||
community.general.docker_swarm:
|
||||
state: inspect
|
||||
register: swarm_info
|
||||
'''
|
||||
|
|
|
@ -89,7 +89,7 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Get info on Docker Swarm
|
||||
docker_swarm_info:
|
||||
community.general.docker_swarm_info:
|
||||
ignore_errors: yes
|
||||
register: result
|
||||
|
||||
|
@ -103,18 +103,18 @@ EXAMPLES = '''
|
|||
- block:
|
||||
|
||||
- name: Get info on Docker Swarm and list of registered nodes
|
||||
docker_swarm_info:
|
||||
community.general.docker_swarm_info:
|
||||
nodes: yes
|
||||
register: result
|
||||
|
||||
- name: Get info on Docker Swarm and extended list of registered nodes
|
||||
docker_swarm_info:
|
||||
community.general.docker_swarm_info:
|
||||
nodes: yes
|
||||
verbose_output: yes
|
||||
register: result
|
||||
|
||||
- name: Get info on Docker Swarm and filtered list of registered nodes
|
||||
docker_swarm_info:
|
||||
community.general.docker_swarm_info:
|
||||
nodes: yes
|
||||
nodes_filters:
|
||||
name: mynode
|
||||
|
@ -124,7 +124,7 @@ EXAMPLES = '''
|
|||
var: result.swarm_facts
|
||||
|
||||
- name: Get the swarm unlock key
|
||||
docker_swarm_info:
|
||||
community.general.docker_swarm_info:
|
||||
unlock_key: yes
|
||||
register: result
|
||||
|
||||
|
|
|
@ -891,7 +891,7 @@ rebuilt:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Set command and arguments
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine
|
||||
command: sleep
|
||||
|
@ -899,7 +899,7 @@ EXAMPLES = '''
|
|||
- "3600"
|
||||
|
||||
- name: Set a bind mount
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine
|
||||
mounts:
|
||||
|
@ -908,7 +908,7 @@ EXAMPLES = '''
|
|||
type: bind
|
||||
|
||||
- name: Set service labels
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine
|
||||
labels:
|
||||
|
@ -916,7 +916,7 @@ EXAMPLES = '''
|
|||
com.example.department: "Finance"
|
||||
|
||||
- name: Set environment variables
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine
|
||||
env:
|
||||
|
@ -927,7 +927,7 @@ EXAMPLES = '''
|
|||
- envs/apps/web.env
|
||||
|
||||
- name: Set fluentd logging
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine
|
||||
logging:
|
||||
|
@ -938,7 +938,7 @@ EXAMPLES = '''
|
|||
tag: myservice
|
||||
|
||||
- name: Set restart policies
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine
|
||||
restart_config:
|
||||
|
@ -948,7 +948,7 @@ EXAMPLES = '''
|
|||
window: 120s
|
||||
|
||||
- name: Set update config
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine
|
||||
update_config:
|
||||
|
@ -957,7 +957,7 @@ EXAMPLES = '''
|
|||
order: stop-first
|
||||
|
||||
- name: Set rollback config
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine
|
||||
update_config:
|
||||
|
@ -968,7 +968,7 @@ EXAMPLES = '''
|
|||
order: stop-first
|
||||
|
||||
- name: Set placement preferences
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine:edge
|
||||
placement:
|
||||
|
@ -979,7 +979,7 @@ EXAMPLES = '''
|
|||
- engine.labels.operatingsystem == ubuntu 14.04
|
||||
|
||||
- name: Set configs
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine:edge
|
||||
configs:
|
||||
|
@ -987,14 +987,14 @@ EXAMPLES = '''
|
|||
filename: "/tmp/config.txt"
|
||||
|
||||
- name: Set networks
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine:edge
|
||||
networks:
|
||||
- mynetwork
|
||||
|
||||
- name: Set networks as a dictionary
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine:edge
|
||||
networks:
|
||||
|
@ -1005,7 +1005,7 @@ EXAMPLES = '''
|
|||
foo: bar
|
||||
|
||||
- name: Set secrets
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine:edge
|
||||
secrets:
|
||||
|
@ -1013,7 +1013,7 @@ EXAMPLES = '''
|
|||
filename: "/run/secrets/secret.txt"
|
||||
|
||||
- name: Start service with healthcheck
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: nginx:1.13
|
||||
healthcheck:
|
||||
|
@ -1026,7 +1026,7 @@ EXAMPLES = '''
|
|||
start_period: 30s
|
||||
|
||||
- name: Configure service resources
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
image: alpine:edge
|
||||
reservations:
|
||||
|
@ -1037,7 +1037,7 @@ EXAMPLES = '''
|
|||
memory: 50M
|
||||
|
||||
- name: Remove service
|
||||
docker_swarm_service:
|
||||
community.general.docker_swarm_service:
|
||||
name: myservice
|
||||
state: absent
|
||||
'''
|
||||
|
|
|
@ -40,7 +40,7 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Get info from a service
|
||||
docker_swarm_service_info:
|
||||
community.general.docker_swarm_service_info:
|
||||
name: myservice
|
||||
register: result
|
||||
'''
|
||||
|
|
|
@ -92,16 +92,16 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a volume
|
||||
docker_volume:
|
||||
community.general.docker_volume:
|
||||
name: volume_one
|
||||
|
||||
- name: Remove a volume
|
||||
docker_volume:
|
||||
community.general.docker_volume:
|
||||
name: volume_one
|
||||
state: absent
|
||||
|
||||
- name: Create a volume with options
|
||||
docker_volume:
|
||||
community.general.docker_volume:
|
||||
name: volume_two
|
||||
driver_options:
|
||||
type: btrfs
|
||||
|
|
|
@ -37,7 +37,7 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Get infos on volume
|
||||
docker_volume_info:
|
||||
community.general.docker_volume_info:
|
||||
name: mydata
|
||||
register: result
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Upload some content
|
||||
gc_storage:
|
||||
community.general.gc_storage:
|
||||
bucket: mybucket
|
||||
object: key.txt
|
||||
src: /usr/local/myfile.txt
|
||||
|
@ -93,49 +93,49 @@ EXAMPLES = '''
|
|||
permission: public-read
|
||||
|
||||
- name: Upload some headers
|
||||
gc_storage:
|
||||
community.general.gc_storage:
|
||||
bucket: mybucket
|
||||
object: key.txt
|
||||
src: /usr/local/myfile.txt
|
||||
headers: '{"Content-Encoding": "gzip"}'
|
||||
|
||||
- name: Download some content
|
||||
gc_storage:
|
||||
community.general.gc_storage:
|
||||
bucket: mybucket
|
||||
object: key.txt
|
||||
dest: /usr/local/myfile.txt
|
||||
mode: get
|
||||
|
||||
- name: Download an object as a string to use else where in your playbook
|
||||
gc_storage:
|
||||
community.general.gc_storage:
|
||||
bucket: mybucket
|
||||
object: key.txt
|
||||
mode: get_str
|
||||
|
||||
- name: Create an empty bucket
|
||||
gc_storage:
|
||||
community.general.gc_storage:
|
||||
bucket: mybucket
|
||||
mode: create
|
||||
|
||||
- name: Create a bucket with key as directory
|
||||
gc_storage:
|
||||
community.general.gc_storage:
|
||||
bucket: mybucket
|
||||
object: /my/directory/path
|
||||
mode: create
|
||||
|
||||
- name: Delete a bucket and all contents
|
||||
gc_storage:
|
||||
community.general.gc_storage:
|
||||
bucket: mybucket
|
||||
mode: delete
|
||||
|
||||
- name: Create a bucket with versioning enabled
|
||||
gc_storage:
|
||||
community.general.gc_storage:
|
||||
bucket: "mybucket"
|
||||
versioning: yes
|
||||
mode: create
|
||||
|
||||
- name: Create a bucket located in the eu
|
||||
gc_storage:
|
||||
community.general.gc_storage:
|
||||
bucket: "mybucket"
|
||||
region: "europe-west3"
|
||||
mode: create
|
||||
|
|
|
@ -129,14 +129,14 @@ notes:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create an A record
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'www1.example.com'
|
||||
zone: 'example.com'
|
||||
type: A
|
||||
value: '1.2.3.4'
|
||||
|
||||
- name: Update an existing record
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'www1.example.com'
|
||||
zone: 'example.com'
|
||||
type: A
|
||||
|
@ -144,7 +144,7 @@ EXAMPLES = '''
|
|||
value: '5.6.7.8'
|
||||
|
||||
- name: Remove an A record
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'www1.example.com'
|
||||
zone_id: 'example-com'
|
||||
state: absent
|
||||
|
@ -152,14 +152,14 @@ EXAMPLES = '''
|
|||
value: '5.6.7.8'
|
||||
|
||||
- name: Create a CNAME record. Note the trailing dot of value
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'www.example.com'
|
||||
zone_id: 'example-com'
|
||||
type: CNAME
|
||||
value: 'www.example.com.'
|
||||
|
||||
- name: Create an MX record with a custom TTL. Note the trailing dot of value
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'example.com'
|
||||
zone: 'example.com'
|
||||
type: MX
|
||||
|
@ -167,7 +167,7 @@ EXAMPLES = '''
|
|||
value: '10 mail.example.com.'
|
||||
|
||||
- name: Create multiple A records with the same name
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'api.example.com'
|
||||
zone_id: 'example-com'
|
||||
type: A
|
||||
|
@ -178,7 +178,7 @@ EXAMPLES = '''
|
|||
- '203.0.113.10'
|
||||
|
||||
- name: Change the value of an existing record with multiple record_data
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'api.example.com'
|
||||
zone: 'example.com'
|
||||
type: A
|
||||
|
@ -190,7 +190,7 @@ EXAMPLES = '''
|
|||
- '203.0.113.10'
|
||||
|
||||
- name: Safely remove a multi-line record
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'api.example.com'
|
||||
zone_id: 'example-com'
|
||||
state: absent
|
||||
|
@ -202,7 +202,7 @@ EXAMPLES = '''
|
|||
- '203.0.113.10'
|
||||
|
||||
- name: Unconditionally remove a record
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'api.example.com'
|
||||
zone_id: 'example-com'
|
||||
state: absent
|
||||
|
@ -210,21 +210,21 @@ EXAMPLES = '''
|
|||
type: A
|
||||
|
||||
- name: Create an AAAA record
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'www1.example.com'
|
||||
zone: 'example.com'
|
||||
type: AAAA
|
||||
value: 'fd00:db8::1'
|
||||
|
||||
- name: Create a PTR record
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: '10.5.168.192.in-addr.arpa'
|
||||
zone: '5.168.192.in-addr.arpa'
|
||||
type: PTR
|
||||
value: 'api.example.com.' # Note the trailing dot.
|
||||
|
||||
- name: Create an NS record
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'subdomain.example.com'
|
||||
zone: 'example.com'
|
||||
type: NS
|
||||
|
@ -236,7 +236,7 @@ EXAMPLES = '''
|
|||
- 'ns-cloud-d4.googledomains.com.'
|
||||
|
||||
- name: Create a TXT record
|
||||
gcdns_record:
|
||||
community.general.gcdns_record:
|
||||
record: 'example.com'
|
||||
zone_id: 'example-com'
|
||||
type: TXT
|
||||
|
|
|
@ -69,15 +69,15 @@ notes:
|
|||
EXAMPLES = '''
|
||||
# Basic zone creation example.
|
||||
- name: Create a basic zone with the minimum number of parameters.
|
||||
gcdns_zone: zone=example.com
|
||||
community.general.gcdns_zone: zone=example.com
|
||||
|
||||
# Zone removal example.
|
||||
- name: Remove a zone.
|
||||
gcdns_zone: zone=example.com state=absent
|
||||
community.general.gcdns_zone: zone=example.com state=absent
|
||||
|
||||
# Zone creation with description
|
||||
- name: Creating a zone with a description
|
||||
gcdns_zone: zone=example.com description="This is an awesome zone"
|
||||
community.general.gcdns_zone: zone=example.com description="This is an awesome zone"
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -153,7 +153,7 @@ EXAMPLES = '''
|
|||
# Create multiple instances by specifying multiple names, separated by
|
||||
# commas in the instance_names field
|
||||
# (e.g. my-test-instance1,my-test-instance2)
|
||||
- gce:
|
||||
- community.general.gce:
|
||||
instance_names: my-test-instance1
|
||||
zone: us-central1-a
|
||||
machine_type: n1-standard-1
|
||||
|
@ -167,7 +167,7 @@ EXAMPLES = '''
|
|||
# Create a single instance of an image from the "my-base-image" image family
|
||||
# in the us-central1-a Zone of the n1-standard-1 machine type.
|
||||
# This image family is in the "my-other-project" GCP project.
|
||||
- gce:
|
||||
- community.general.gce:
|
||||
instance_names: my-test-instance1
|
||||
zone: us-central1-a
|
||||
machine_type: n1-standard-1
|
||||
|
@ -183,7 +183,7 @@ EXAMPLES = '''
|
|||
# Create a single Debian 8 instance in the us-central1-a Zone
|
||||
# Use existing disks, custom network/subnetwork, set service account permissions
|
||||
# add tags and metadata.
|
||||
- gce:
|
||||
- community.general.gce:
|
||||
instance_names: my-test-instance
|
||||
zone: us-central1-a
|
||||
machine_type: n1-standard-1
|
||||
|
@ -223,7 +223,7 @@ EXAMPLES = '''
|
|||
- name: Create multiple instances
|
||||
# Basic provisioning example. Create multiple Debian 8 instances in the
|
||||
# us-central1-a Zone of n1-standard-1 machine type.
|
||||
gce:
|
||||
community.general.gce:
|
||||
instance_names: test1,test2,test3
|
||||
zone: us-central1-a
|
||||
machine_type: n1-standard-1
|
||||
|
@ -262,7 +262,7 @@ EXAMPLES = '''
|
|||
|
||||
- name: Delete test-instances
|
||||
# Basic termination of instance.
|
||||
gce:
|
||||
community.general.gce:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
|
@ -354,7 +354,7 @@ def create_instances(module, gce, instance_names, number, lc_zone):
|
|||
up from 'module'
|
||||
|
||||
module : AnsibleModule object
|
||||
gce: authenticated GCE libcloud driver
|
||||
community.general.gce: authenticated GCE libcloud driver
|
||||
instance_names: python list of instance names to create
|
||||
number: number of instances to create
|
||||
lc_zone: GCEZone object
|
||||
|
@ -550,7 +550,7 @@ def change_instance_state(module, gce, instance_names, number, zone, state):
|
|||
change from started to stopped, or started to absent.
|
||||
|
||||
module: Ansible module object
|
||||
gce: authenticated GCE connection object
|
||||
community.general.gce: authenticated GCE connection object
|
||||
instance_names: a list of instance names to terminate
|
||||
zone: GCEZone object where the instances reside prior to termination
|
||||
state: 'state' parameter passed into module as argument
|
||||
|
|
|
@ -37,7 +37,7 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a Global external IP address
|
||||
gce_eip:
|
||||
community.general.gce_eip:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
|
@ -46,7 +46,7 @@ EXAMPLES = '''
|
|||
state: present
|
||||
|
||||
- name: Create a Regional external IP address
|
||||
gce_eip:
|
||||
community.general.gce_eip:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
|
|
|
@ -60,24 +60,24 @@ author: "Tom Melendez (@supertom)"
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create an image named test-image from the disk 'test-disk' in zone us-central1-a
|
||||
gce_img:
|
||||
community.general.gce_img:
|
||||
name: test-image
|
||||
source: test-disk
|
||||
zone: us-central1-a
|
||||
state: present
|
||||
|
||||
- name: Create an image named test-image from a tarball in Google Cloud Storage
|
||||
gce_img:
|
||||
community.general.gce_img:
|
||||
name: test-image
|
||||
source: https://storage.googleapis.com/bucket/path/to/image.tgz
|
||||
|
||||
- name: Alternatively use the gs scheme
|
||||
gce_img:
|
||||
community.general.gce_img:
|
||||
name: test-image
|
||||
source: gs://bucket/path/to/image.tgz
|
||||
|
||||
- name: Delete an image named test-image
|
||||
gce_img:
|
||||
community.general.gce_img:
|
||||
name: test-image
|
||||
state: absent
|
||||
'''
|
||||
|
|
|
@ -148,7 +148,7 @@ author: "Gwenael Pellen (@GwenaelPellenArkeup) <gwenael.pellen@arkeup.com>"
|
|||
EXAMPLES = '''
|
||||
# Usage
|
||||
- name: Create instance template named foo
|
||||
gce_instance_template:
|
||||
community.general.gce_instance_template:
|
||||
name: foo
|
||||
size: n1-standard-1
|
||||
image_family: ubuntu-1604-lts
|
||||
|
@ -166,7 +166,7 @@ EXAMPLES = '''
|
|||
project_id: "your-project-name"
|
||||
tasks:
|
||||
- name: Create instance template
|
||||
gce_instance_template:
|
||||
community.general.gce_instance_template:
|
||||
name: my-test-instance-template
|
||||
size: n1-standard-1
|
||||
image_family: ubuntu-1604-lts
|
||||
|
@ -175,7 +175,7 @@ EXAMPLES = '''
|
|||
credentials_file: "{{ credentials_file }}"
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
- name: Delete instance template
|
||||
gce_instance_template:
|
||||
community.general.gce_instance_template:
|
||||
name: my-test-instance-template
|
||||
size: n1-standard-1
|
||||
image_family: ubuntu-1604-lts
|
||||
|
@ -193,7 +193,7 @@ EXAMPLES = '''
|
|||
project_id: "your-project-name"
|
||||
tasks:
|
||||
- name: Create instance template
|
||||
gce_instance_template:
|
||||
community.general.gce_instance_template:
|
||||
name: foo
|
||||
size: n1-standard-1
|
||||
state: present
|
||||
|
|
|
@ -56,7 +56,7 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Add labels on an existing instance (using resource_url)
|
||||
gce_labels:
|
||||
community.general.gce_labels:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
|
@ -67,7 +67,7 @@ EXAMPLES = '''
|
|||
resource_url: https://www.googleapis.com/compute/beta/projects/myproject/zones/us-central1-f/instances/example-instance
|
||||
state: present
|
||||
- name: Add labels on an image (using resource params)
|
||||
gce_labels:
|
||||
community.general.gce_labels:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
|
@ -80,7 +80,7 @@ EXAMPLES = '''
|
|||
resource_name: my-custom-image
|
||||
state: present
|
||||
- name: Remove specified labels from the GCE instance
|
||||
gce_labels:
|
||||
community.general.gce_labels:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
|
|
|
@ -80,7 +80,7 @@ EXAMPLES = '''
|
|||
gather_facts: False
|
||||
tasks:
|
||||
- name: Create MIG
|
||||
gce_mig:
|
||||
community.general.gce_mig:
|
||||
name: ansible-mig-example
|
||||
zone: us-central1-c
|
||||
state: present
|
||||
|
@ -97,7 +97,7 @@ EXAMPLES = '''
|
|||
seconds: 30
|
||||
|
||||
- name: Recreate MIG Instances with Instance Template change.
|
||||
gce_mig:
|
||||
community.general.gce_mig:
|
||||
name: ansible-mig-example
|
||||
zone: us-central1-c
|
||||
state: present
|
||||
|
@ -109,14 +109,14 @@ EXAMPLES = '''
|
|||
seconds: 30
|
||||
|
||||
- name: Resize MIG
|
||||
gce_mig:
|
||||
community.general.gce_mig:
|
||||
name: ansible-mig-example
|
||||
zone: us-central1-c
|
||||
state: present
|
||||
size: 3
|
||||
|
||||
- name: Update MIG with Autoscaler
|
||||
gce_mig:
|
||||
community.general.gce_mig:
|
||||
name: ansible-mig-example
|
||||
zone: us-central1-c
|
||||
state: present
|
||||
|
@ -140,7 +140,7 @@ EXAMPLES = '''
|
|||
seconds: 30
|
||||
|
||||
- name: Delete MIG
|
||||
gce_mig:
|
||||
community.general.gce_mig:
|
||||
name: ansible-mig-example
|
||||
zone: us-central1-c
|
||||
state: absent
|
||||
|
|
|
@ -96,7 +96,7 @@ author: "Eric Johnson (@erjohnso) <erjohnso@google.com>, Tom Melendez (@supertom
|
|||
EXAMPLES = '''
|
||||
# Create a 'legacy' Network
|
||||
- name: Create Legacy Network
|
||||
gce_net:
|
||||
community.general.gce_net:
|
||||
name: legacynet
|
||||
ipv4_range: '10.24.17.0/24'
|
||||
mode: legacy
|
||||
|
@ -104,14 +104,14 @@ EXAMPLES = '''
|
|||
|
||||
# Create an 'auto' Network
|
||||
- name: Create Auto Network
|
||||
gce_net:
|
||||
community.general.gce_net:
|
||||
name: autonet
|
||||
mode: auto
|
||||
state: present
|
||||
|
||||
# Create a 'custom' Network
|
||||
- name: Create Custom Network
|
||||
gce_net:
|
||||
community.general.gce_net:
|
||||
name: customnet
|
||||
mode: custom
|
||||
subnet_name: "customsubnet"
|
||||
|
@ -121,7 +121,7 @@ EXAMPLES = '''
|
|||
|
||||
# Create Firewall Rule with Source Tags
|
||||
- name: Create Firewall Rule w/Source Tags
|
||||
gce_net:
|
||||
community.general.gce_net:
|
||||
name: default
|
||||
fwname: "my-firewall-rule"
|
||||
allowed: tcp:80
|
||||
|
@ -130,7 +130,7 @@ EXAMPLES = '''
|
|||
|
||||
# Create Firewall Rule with Source Range
|
||||
- name: Create Firewall Rule w/Source Range
|
||||
gce_net:
|
||||
community.general.gce_net:
|
||||
name: default
|
||||
fwname: "my-firewall-rule"
|
||||
allowed: tcp:80
|
||||
|
@ -139,7 +139,7 @@ EXAMPLES = '''
|
|||
|
||||
# Create Custom Subnetwork
|
||||
- name: Create Custom Subnetwork
|
||||
gce_net:
|
||||
community.general.gce_net:
|
||||
name: privatenet
|
||||
mode: custom
|
||||
subnet_name: subnet_example
|
||||
|
|
|
@ -56,7 +56,7 @@ author: Rob Wagner (@robwagner33)
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create gce snapshot
|
||||
gce_snapshot:
|
||||
community.general.gce_snapshot:
|
||||
instance_name: example-instance
|
||||
snapshot_name: example-snapshot
|
||||
state: present
|
||||
|
@ -66,7 +66,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
|
||||
- name: Delete gce snapshot
|
||||
gce_snapshot:
|
||||
community.general.gce_snapshot:
|
||||
instance_name: example-instance
|
||||
snapshot_name: example-snapshot
|
||||
state: absent
|
||||
|
@ -78,7 +78,7 @@ EXAMPLES = '''
|
|||
# This example creates snapshots for only two of the available disks as
|
||||
# disk0-example-snapshot and disk1-example-snapshot
|
||||
- name: Create snapshots of specific disks
|
||||
gce_snapshot:
|
||||
community.general.gce_snapshot:
|
||||
instance_name: example-instance
|
||||
snapshot_name: example-snapshot
|
||||
state: present
|
||||
|
|
|
@ -58,20 +58,20 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Add tags to instance
|
||||
gce_tag:
|
||||
community.general.gce_tag:
|
||||
instance_name: staging-server
|
||||
tags: http-server,https-server,staging
|
||||
zone: us-central1-a
|
||||
state: present
|
||||
|
||||
- name: Remove tags from instance in default zone (us-central1-a)
|
||||
gce_tag:
|
||||
community.general.gce_tag:
|
||||
instance_name: test-server
|
||||
tags: foo,bar
|
||||
state: absent
|
||||
|
||||
- name: Add tags to instances in zone that match pattern
|
||||
gce_tag:
|
||||
community.general.gce_tag:
|
||||
instance_pattern: test-server-*
|
||||
tags: foo,bar
|
||||
zone: us-central1-a
|
||||
|
|
|
@ -45,7 +45,7 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create Minimum HTTP Target_Proxy
|
||||
gcp_target_proxy:
|
||||
community.general.gcp_target_proxy:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
|
|
|
@ -70,7 +70,7 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create Minimal Url_Map
|
||||
gcp_url_map:
|
||||
community.general.gcp_url_map:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
|
@ -78,7 +78,7 @@ EXAMPLES = '''
|
|||
default_service: my-backend-service
|
||||
state: present
|
||||
- name: Create UrlMap with pathmatcher
|
||||
gcp_url_map:
|
||||
community.general.gcp_url_map:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
|
|
|
@ -63,21 +63,21 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create instance
|
||||
gcspanner:
|
||||
community.general.gcspanner:
|
||||
instance_id: '{{ instance_id }}'
|
||||
configuration: '{{ configuration }}'
|
||||
state: present
|
||||
node_count: 1
|
||||
|
||||
- name: Create database
|
||||
gcspanner:
|
||||
community.general.gcspanner:
|
||||
instance_id: '{{ instance_id }}'
|
||||
configuration: '{{ configuration }}'
|
||||
database_name: '{{ database_name }}'
|
||||
state: present
|
||||
|
||||
- name: Delete instance (and all databases)
|
||||
- gcspanner:
|
||||
- community.general.gcspanner:
|
||||
instance_id: '{{ instance_id }}'
|
||||
configuration: '{{ configuration }}'
|
||||
state: absent
|
||||
|
|
|
@ -48,14 +48,14 @@ notes:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a heroku collaborator
|
||||
heroku_collaborator:
|
||||
community.general.heroku_collaborator:
|
||||
api_key: YOUR_API_KEY
|
||||
user: max.mustermann@example.com
|
||||
apps: heroku-example-app
|
||||
state: present
|
||||
|
||||
- name: An example of using the module in loop
|
||||
heroku_collaborator:
|
||||
community.general.heroku_collaborator:
|
||||
api_key: YOUR_API_KEY
|
||||
user: '{{ item.user }}'
|
||||
apps: '{{ item.apps | default(apps) }}'
|
||||
|
|
|
@ -256,7 +256,7 @@ EXAMPLES = '''
|
|||
size: 10
|
||||
register: disk
|
||||
- name: Create an instance
|
||||
hwc_ecs_instance:
|
||||
community.general.hwc_ecs_instance:
|
||||
data_volumes:
|
||||
- volume_id: "{{ disk.id }}"
|
||||
enable_auto_recovery: false
|
||||
|
|
|
@ -156,7 +156,7 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# test create disk
|
||||
- name: Create a disk
|
||||
hwc_evs_disk:
|
||||
community.general.hwc_evs_disk:
|
||||
availability_zone: "cn-north-1a"
|
||||
name: "ansible_evs_disk_test"
|
||||
volume_type: "SATA"
|
||||
|
|
|
@ -66,7 +66,7 @@ extends_documentation_fragment:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a vpc
|
||||
hwc_network_vpc:
|
||||
community.general.hwc_network_vpc:
|
||||
identity_endpoint: "{{ identity_endpoint }}"
|
||||
user: "{{ user }}"
|
||||
password: "{{ password }}"
|
||||
|
|
|
@ -51,7 +51,7 @@ extends_documentation_fragment:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a smn topic
|
||||
hwc_smn_topic:
|
||||
community.general.hwc_smn_topic:
|
||||
identity_endpoint: "{{ identity_endpoint }}"
|
||||
user_name: "{{ user_name }}"
|
||||
password: "{{ password }}"
|
||||
|
|
|
@ -145,7 +145,7 @@ EXAMPLES = '''
|
|||
ip_address: "192.168.100.33"
|
||||
register: port
|
||||
- name: Create an eip and bind it to a port
|
||||
hwc_vpc_eip:
|
||||
community.general.hwc_vpc_eip:
|
||||
type: "5_bgp"
|
||||
dedicated_bandwidth:
|
||||
charge_mode: "traffic"
|
||||
|
|
|
@ -91,7 +91,7 @@ EXAMPLES = '''
|
|||
name: "ansible_network_vpc_test_peering"
|
||||
register: vpc2
|
||||
- name: Create a peering connect
|
||||
hwc_vpc_peering_connect:
|
||||
community.general.hwc_vpc_peering_connect:
|
||||
local_vpc_id: "{{ vpc1.id }}"
|
||||
name: "ansible_network_peering_test"
|
||||
peering_vpc:
|
||||
|
|
|
@ -121,7 +121,7 @@ EXAMPLES = '''
|
|||
cidr: "192.168.100.0/26"
|
||||
register: subnet
|
||||
- name: Create a port
|
||||
hwc_vpc_port:
|
||||
community.general.hwc_vpc_port:
|
||||
subnet_id: "{{ subnet.id }}"
|
||||
ip_address: "192.168.100.33"
|
||||
'''
|
||||
|
|
|
@ -68,7 +68,7 @@ EXAMPLES = '''
|
|||
cidr: "192.168.100.0/26"
|
||||
register: subnet
|
||||
- name: Create a private ip
|
||||
hwc_vpc_private_ip:
|
||||
community.general.hwc_vpc_private_ip:
|
||||
subnet_id: "{{ subnet.id }}"
|
||||
ip_address: "192.168.100.33"
|
||||
'''
|
||||
|
|
|
@ -81,7 +81,7 @@ EXAMPLES = '''
|
|||
vpc_id: "{{ vpc2.id }}"
|
||||
register: connect
|
||||
- name: Create a route
|
||||
hwc_vpc_route:
|
||||
community.general.hwc_vpc_route:
|
||||
vpc_id: "{{ vpc1.id }}"
|
||||
destination: "192.168.0.0/16"
|
||||
next_hop: "{{ connect.id }}"
|
||||
|
|
|
@ -66,7 +66,7 @@ extends_documentation_fragment:
|
|||
EXAMPLES = '''
|
||||
# create a security group
|
||||
- name: Create a security group
|
||||
hwc_vpc_security_group:
|
||||
community.general.hwc_vpc_security_group:
|
||||
name: "ansible_network_security_group_test"
|
||||
'''
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ EXAMPLES = '''
|
|||
name: "ansible_network_security_group_test"
|
||||
register: sg
|
||||
- name: Create a security group rule
|
||||
hwc_vpc_security_group_rule:
|
||||
community.general.hwc_vpc_security_group_rule:
|
||||
direction: "ingress"
|
||||
protocol: "tcp"
|
||||
ethertype: "IPv4"
|
||||
|
|
|
@ -104,7 +104,7 @@ EXAMPLES = '''
|
|||
name: "ansible_network_vpc_test"
|
||||
register: vpc
|
||||
- name: Create subnet
|
||||
hwc_vpc_subnet:
|
||||
community.general.hwc_vpc_subnet:
|
||||
vpc_id: "{{ vpc.id }}"
|
||||
cidr: "192.168.100.0/26"
|
||||
gateway_ip: "192.168.100.32"
|
||||
|
|
|
@ -64,7 +64,7 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Upload local image to pvc-vm1
|
||||
kubevirt_cdi_upload:
|
||||
community.general.kubevirt_cdi_upload:
|
||||
pvc_namespace: default
|
||||
pvc_name: pvc-vm1
|
||||
upload_host: https://localhost:8443
|
||||
|
|
|
@ -57,7 +57,7 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create virtual machine preset 'vmi-preset-small'
|
||||
kubevirt_preset:
|
||||
community.general.kubevirt_preset:
|
||||
state: present
|
||||
name: vmi-preset-small
|
||||
namespace: vms
|
||||
|
@ -67,7 +67,7 @@ EXAMPLES = '''
|
|||
kubevirt.io/vmPreset: vmi-preset-small
|
||||
|
||||
- name: Remove virtual machine preset 'vmi-preset-small'
|
||||
kubevirt_preset:
|
||||
community.general.kubevirt_preset:
|
||||
state: absent
|
||||
name: vmi-preset-small
|
||||
namespace: vms
|
||||
|
|
|
@ -148,7 +148,7 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a PVC and import data from an external source
|
||||
kubevirt_pvc:
|
||||
community.general.kubevirt_pvc:
|
||||
name: pvc1
|
||||
namespace: default
|
||||
size: 100Mi
|
||||
|
@ -161,7 +161,7 @@ EXAMPLES = '''
|
|||
#content_type: archive
|
||||
|
||||
- name: Create a PVC as a clone from a different PVC
|
||||
kubevirt_pvc:
|
||||
community.general.kubevirt_pvc:
|
||||
name: pvc2
|
||||
namespace: default
|
||||
size: 100Mi
|
||||
|
@ -173,7 +173,7 @@ EXAMPLES = '''
|
|||
name: source-pvc
|
||||
|
||||
- name: Create a PVC ready for data upload
|
||||
kubevirt_pvc:
|
||||
community.general.kubevirt_pvc:
|
||||
name: pvc3
|
||||
namespace: default
|
||||
size: 100Mi
|
||||
|
@ -184,7 +184,7 @@ EXAMPLES = '''
|
|||
# You need the kubevirt_cdi_upload module to actually upload something
|
||||
|
||||
- name: Create a PVC with a blank raw image
|
||||
kubevirt_pvc:
|
||||
community.general.kubevirt_pvc:
|
||||
name: pvc4
|
||||
namespace: default
|
||||
size: 100Mi
|
||||
|
@ -194,7 +194,7 @@ EXAMPLES = '''
|
|||
blank: yes
|
||||
|
||||
- name: Create a PVC and fill it with data from a container
|
||||
kubevirt_pvc:
|
||||
community.general.kubevirt_pvc:
|
||||
name: pvc5
|
||||
namespace: default
|
||||
size: 100Mi
|
||||
|
|
|
@ -63,7 +63,7 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create virtual machine replica set 'myvmir'
|
||||
kubevirt_rs:
|
||||
community.general.kubevirt_rs:
|
||||
state: present
|
||||
name: myvmir
|
||||
namespace: vms
|
||||
|
@ -85,7 +85,7 @@ EXAMPLES = '''
|
|||
bus: virtio
|
||||
|
||||
- name: Remove virtual machine replica set 'myvmir'
|
||||
kubevirt_rs:
|
||||
community.general.kubevirt_rs:
|
||||
state: absent
|
||||
name: myvmir
|
||||
namespace: vms
|
||||
|
|
|
@ -144,7 +144,7 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create template 'mytemplate'
|
||||
kubevirt_template:
|
||||
community.general.kubevirt_template:
|
||||
state: present
|
||||
name: myvmtemplate
|
||||
namespace: templates
|
||||
|
@ -182,7 +182,7 @@ EXAMPLES = '''
|
|||
value: 1Gi
|
||||
|
||||
- name: Remove template 'myvmtemplate'
|
||||
kubevirt_template:
|
||||
community.general.kubevirt_template:
|
||||
state: absent
|
||||
name: myvmtemplate
|
||||
namespace: templates
|
||||
|
|
|
@ -79,13 +79,13 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Start virtual machine 'myvm'
|
||||
kubevirt_vm:
|
||||
community.general.kubevirt_vm:
|
||||
state: running
|
||||
name: myvm
|
||||
namespace: vms
|
||||
|
||||
- name: Create virtual machine 'myvm' and start it
|
||||
kubevirt_vm:
|
||||
community.general.kubevirt_vm:
|
||||
state: running
|
||||
name: myvm
|
||||
namespace: vms
|
||||
|
@ -111,7 +111,7 @@ EXAMPLES = '''
|
|||
bus: virtio
|
||||
|
||||
- name: Create virtual machine 'myvm' with multus network interface
|
||||
kubevirt_vm:
|
||||
community.general.kubevirt_vm:
|
||||
name: myvm
|
||||
namespace: vms
|
||||
memory: 512M
|
||||
|
@ -127,7 +127,7 @@ EXAMPLES = '''
|
|||
networkName: mynetconf
|
||||
|
||||
- name: Combine inline definition with Ansible parameters
|
||||
kubevirt_vm:
|
||||
community.general.kubevirt_vm:
|
||||
# Kubernetes specification:
|
||||
definition:
|
||||
metadata:
|
||||
|
@ -151,7 +151,7 @@ EXAMPLES = '''
|
|||
bus: virtio
|
||||
|
||||
- name: Start ephemeral virtual machine 'myvm' and wait to be running
|
||||
kubevirt_vm:
|
||||
community.general.kubevirt_vm:
|
||||
ephemeral: true
|
||||
state: running
|
||||
wait: true
|
||||
|
@ -171,7 +171,7 @@ EXAMPLES = '''
|
|||
bus: virtio
|
||||
|
||||
- name: Start fedora vm with cloud init
|
||||
kubevirt_vm:
|
||||
community.general.kubevirt_vm:
|
||||
state: running
|
||||
wait: true
|
||||
name: myvm
|
||||
|
@ -201,7 +201,7 @@ EXAMPLES = '''
|
|||
- S2
|
||||
|
||||
- name: Create virtual machine with datavolume and specify node affinity
|
||||
kubevirt_vm:
|
||||
community.general.kubevirt_vm:
|
||||
name: myvm
|
||||
namespace: default
|
||||
memory: 1024Mi
|
||||
|
@ -224,7 +224,7 @@ EXAMPLES = '''
|
|||
- S1
|
||||
|
||||
- name: Remove virtual machine 'myvm'
|
||||
kubevirt_vm:
|
||||
community.general.kubevirt_vm:
|
||||
state: absent
|
||||
name: myvm
|
||||
namespace: vms
|
||||
|
|
|
@ -139,7 +139,7 @@ notes:
|
|||
EXAMPLES = '''
|
||||
|
||||
- name: Create a new Linode
|
||||
linode:
|
||||
community.general.linode:
|
||||
name: linode-test1
|
||||
plan: 1
|
||||
datacenter: 7
|
||||
|
@ -148,7 +148,7 @@ EXAMPLES = '''
|
|||
register: linode_creation
|
||||
|
||||
- name: Create a server with a private IP Address
|
||||
linode:
|
||||
community.general.linode:
|
||||
module: linode
|
||||
api_key: 'longStringFromLinodeApi'
|
||||
name: linode-test1
|
||||
|
@ -166,7 +166,7 @@ EXAMPLES = '''
|
|||
register: linode_creation
|
||||
|
||||
- name: Fully configure new server
|
||||
linode:
|
||||
community.general.linode:
|
||||
api_key: 'longStringFromLinodeApi'
|
||||
name: linode-test1
|
||||
plan: 4
|
||||
|
@ -201,7 +201,7 @@ EXAMPLES = '''
|
|||
register: linode_creation
|
||||
|
||||
- name: Ensure a running server (create if missing)
|
||||
linode:
|
||||
community.general.linode:
|
||||
api_key: 'longStringFromLinodeApi'
|
||||
name: linode-test1
|
||||
plan: 1
|
||||
|
@ -217,7 +217,7 @@ EXAMPLES = '''
|
|||
register: linode_creation
|
||||
|
||||
- name: Delete a server
|
||||
linode:
|
||||
community.general.linode:
|
||||
api_key: 'longStringFromLinodeApi'
|
||||
name: linode-test1
|
||||
linode_id: "{{ linode_creation.instance.id }}"
|
||||
|
@ -225,7 +225,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
|
||||
- name: Stop a server
|
||||
linode:
|
||||
community.general.linode:
|
||||
api_key: 'longStringFromLinodeApi'
|
||||
name: linode-test1
|
||||
linode_id: "{{ linode_creation.instance.id }}"
|
||||
|
@ -233,7 +233,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
|
||||
- name: Reboot a server
|
||||
linode:
|
||||
community.general.linode:
|
||||
api_key: 'longStringFromLinodeApi'
|
||||
name: linode-test1
|
||||
linode_id: "{{ linode_creation.instance.id }}"
|
||||
|
|
|
@ -93,7 +93,7 @@ options:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: Create a new Linode.
|
||||
linode_v4:
|
||||
community.general.linode_v4:
|
||||
label: new-linode
|
||||
type: g6-nanode-1
|
||||
region: eu-west
|
||||
|
@ -104,7 +104,7 @@ EXAMPLES = """
|
|||
state: present
|
||||
|
||||
- name: Delete that new Linode.
|
||||
linode_v4:
|
||||
community.general.linode_v4:
|
||||
label: new-linode
|
||||
state: absent
|
||||
"""
|
||||
|
|
|
@ -172,7 +172,7 @@ notes:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: Create a started container
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-started
|
||||
container_log: true
|
||||
template: ubuntu
|
||||
|
@ -180,7 +180,7 @@ EXAMPLES = """
|
|||
template_options: --release trusty
|
||||
|
||||
- name: Create a stopped container
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-stopped
|
||||
container_log: true
|
||||
template: ubuntu
|
||||
|
@ -188,7 +188,7 @@ EXAMPLES = """
|
|||
template_options: --release trusty
|
||||
|
||||
- name: Create a frozen container
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-frozen
|
||||
container_log: true
|
||||
template: ubuntu
|
||||
|
@ -199,7 +199,7 @@ EXAMPLES = """
|
|||
|
||||
# Create filesystem container, configure it, and archive it, and start it.
|
||||
- name: Create filesystem container
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-config
|
||||
backing_store: dir
|
||||
container_log: true
|
||||
|
@ -216,7 +216,7 @@ EXAMPLES = """
|
|||
# configuration to it, create an archive of it, and finally leave the container
|
||||
# in a frozen state. The container archive will be compressed using bzip2
|
||||
- name: Create a frozen lvm container
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-lvm
|
||||
container_log: true
|
||||
template: ubuntu
|
||||
|
@ -242,33 +242,33 @@ EXAMPLES = """
|
|||
var: lvm_container_info
|
||||
|
||||
- name: Run a command in a container and ensure its in a "stopped" state.
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-started
|
||||
state: stopped
|
||||
container_command: |
|
||||
echo 'hello world.' | tee /opt/stopped
|
||||
|
||||
- name: Run a command in a container and ensure its it in a "frozen" state.
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-stopped
|
||||
state: frozen
|
||||
container_command: |
|
||||
echo 'hello world.' | tee /opt/frozen
|
||||
|
||||
- name: Start a container
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-stopped
|
||||
state: started
|
||||
|
||||
- name: Run a command in a container and then restart it
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-started
|
||||
state: restarted
|
||||
container_command: |
|
||||
echo 'hello world.' | tee /opt/restarted
|
||||
|
||||
- name: Run a complex command within a "running" container
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-started
|
||||
container_command: |
|
||||
apt-get update
|
||||
|
@ -281,7 +281,7 @@ EXAMPLES = """
|
|||
# Create an archive of an existing container, save the archive to a defined
|
||||
# path and then destroy it.
|
||||
- name: Archive container
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-started
|
||||
state: absent
|
||||
archive: true
|
||||
|
@ -291,7 +291,7 @@ EXAMPLES = """
|
|||
# snapshot clone of the container and and finally leave the container
|
||||
# in a frozen state. The container archive will be compressed using gzip.
|
||||
- name: Create an overlayfs container archive and clone it
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-overlayfs
|
||||
container_log: true
|
||||
template: ubuntu
|
||||
|
@ -309,20 +309,20 @@ EXAMPLES = """
|
|||
var: clone_container_info
|
||||
|
||||
- name: Clone a container using snapshot
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-overlayfs-clone-snapshot
|
||||
backing_store: overlayfs
|
||||
clone_name: test-container-overlayfs-clone-snapshot2
|
||||
clone_snapshot: true
|
||||
|
||||
- name: Create a new container and clone it
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-new-archive
|
||||
backing_store: dir
|
||||
clone_name: test-container-new-archive-clone
|
||||
|
||||
- name: Archive and clone a container then destroy it
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-new-archive
|
||||
state: absent
|
||||
clone_name: test-container-new-archive-destroyed-clone
|
||||
|
@ -330,12 +330,12 @@ EXAMPLES = """
|
|||
archive_compression: gzip
|
||||
|
||||
- name: Start a cloned container.
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: test-container-new-archive-destroyed-clone
|
||||
state: started
|
||||
|
||||
- name: Destroy a container
|
||||
lxc_container:
|
||||
community.general.lxc_container:
|
||||
name: '{{ item }}'
|
||||
state: absent
|
||||
with_items:
|
||||
|
|
|
@ -149,7 +149,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Create a started container
|
||||
lxd_container:
|
||||
community.general.lxd_container:
|
||||
name: mycontainer
|
||||
state: started
|
||||
source:
|
||||
|
@ -182,7 +182,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Create a started container
|
||||
lxd_container:
|
||||
community.general.lxd_container:
|
||||
name: mycontainer
|
||||
state: started
|
||||
source:
|
||||
|
@ -203,7 +203,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Delete a container
|
||||
lxd_container:
|
||||
community.general.lxd_container:
|
||||
name: mycontainer
|
||||
state: absent
|
||||
|
||||
|
@ -212,7 +212,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Restart a container
|
||||
lxd_container:
|
||||
community.general.lxd_container:
|
||||
name: mycontainer
|
||||
state: restarted
|
||||
|
||||
|
@ -221,7 +221,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Restart a container
|
||||
lxd_container:
|
||||
community.general.lxd_container:
|
||||
url: https://127.0.0.1:8443
|
||||
# These client_cert and client_key values are equal to the default values.
|
||||
#client_cert: "{{ lookup('env', 'HOME') }}/.config/lxc/client.crt"
|
||||
|
|
|
@ -99,7 +99,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Create a profile
|
||||
lxd_profile:
|
||||
community.general.lxd_profile:
|
||||
name: macvlan
|
||||
state: present
|
||||
config: {}
|
||||
|
@ -115,7 +115,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Create macvlan profile
|
||||
lxd_profile:
|
||||
community.general.lxd_profile:
|
||||
url: https://127.0.0.1:8443
|
||||
# These client_cert and client_key values are equal to the default values.
|
||||
#client_cert: "{{ lookup('env', 'HOME') }}/.config/lxc/client.crt"
|
||||
|
@ -136,7 +136,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Delete a profile
|
||||
lxd_profile:
|
||||
community.general.lxd_profile:
|
||||
name: macvlan
|
||||
state: absent
|
||||
|
||||
|
@ -145,7 +145,7 @@ EXAMPLES = '''
|
|||
connection: local
|
||||
tasks:
|
||||
- name: Rename a profile
|
||||
lxd_profile:
|
||||
community.general.lxd_profile:
|
||||
name: macvlan
|
||||
new_name: macvlan2
|
||||
state: present
|
||||
|
|
|
@ -38,7 +38,7 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Submit DNS reload and poll
|
||||
memset_dns_reload:
|
||||
community.general.memset_dns_reload:
|
||||
api_key: 5eb86c9196ab03919abcf03857163741
|
||||
poll: True
|
||||
delegate_to: localhost
|
||||
|
|
|
@ -31,7 +31,7 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Get usage for mstestyaa1
|
||||
memset_memstore_info:
|
||||
community.general.memset_memstore_info:
|
||||
name: mstestyaa1
|
||||
api_key: 5eb86c9896ab03919abcf03857163741
|
||||
delegate_to: localhost
|
||||
|
|
|
@ -31,7 +31,7 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Get details for testyaa1
|
||||
memset_server_info:
|
||||
community.general.memset_server_info:
|
||||
name: testyaa1
|
||||
api_key: 5eb86c9896ab03919abcf03857163741
|
||||
delegate_to: localhost
|
||||
|
|
|
@ -51,7 +51,7 @@ options:
|
|||
EXAMPLES = '''
|
||||
# Create the zone 'test'
|
||||
- name: Create zone
|
||||
memset_zone:
|
||||
community.general.memset_zone:
|
||||
name: test
|
||||
state: present
|
||||
api_key: 5eb86c9196ab03919abcf03857163741
|
||||
|
@ -60,7 +60,7 @@ EXAMPLES = '''
|
|||
|
||||
# Force zone deletion
|
||||
- name: Force delete zone
|
||||
memset_zone:
|
||||
community.general.memset_zone:
|
||||
name: test
|
||||
state: absent
|
||||
api_key: 5eb86c9196ab03919abcf03857163741
|
||||
|
|
|
@ -45,7 +45,7 @@ options:
|
|||
EXAMPLES = '''
|
||||
# Create the zone domain 'test.com'
|
||||
- name: Create zone domain
|
||||
memset_zone_domain:
|
||||
community.general.memset_zone_domain:
|
||||
domain: test.com
|
||||
zone: testzone
|
||||
state: present
|
||||
|
|
|
@ -67,7 +67,7 @@ options:
|
|||
EXAMPLES = '''
|
||||
# Create DNS record for www.domain.com
|
||||
- name: Create DNS record
|
||||
memset_zone_record:
|
||||
community.general.memset_zone_record:
|
||||
api_key: dcf089a2896940da9ffefb307ef49ccd
|
||||
state: present
|
||||
zone: domain.com
|
||||
|
@ -80,7 +80,7 @@ EXAMPLES = '''
|
|||
|
||||
# create an SPF record for domain.com
|
||||
- name: Create SPF record for domain.com
|
||||
memset_zone_record:
|
||||
community.general.memset_zone_record:
|
||||
api_key: dcf089a2896940da9ffefb307ef49ccd
|
||||
state: present
|
||||
zone: domain.com
|
||||
|
@ -90,7 +90,7 @@ EXAMPLES = '''
|
|||
|
||||
# create multiple DNS records
|
||||
- name: Create multiple DNS records
|
||||
memset_zone_record:
|
||||
community.general.memset_zone_record:
|
||||
api_key: dcf089a2896940da9ffefb307ef49ccd
|
||||
zone: "{{ item.zone }}"
|
||||
type: "{{ item.type }}"
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -102,7 +102,7 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a firewall policy
|
||||
oneandone_firewall_policy:
|
||||
community.general.oneandone_firewall_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
name: ansible-firewall-policy
|
||||
description: Testing creation of firewall policies with ansible
|
||||
|
@ -116,13 +116,13 @@ EXAMPLES = '''
|
|||
wait_timeout: 500
|
||||
|
||||
- name: Destroy a firewall policy
|
||||
oneandone_firewall_policy:
|
||||
community.general.oneandone_firewall_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
state: absent
|
||||
name: ansible-firewall-policy
|
||||
|
||||
- name: Update a firewall policy
|
||||
oneandone_firewall_policy:
|
||||
community.general.oneandone_firewall_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
state: update
|
||||
firewall_policy: ansible-firewall-policy
|
||||
|
@ -130,7 +130,7 @@ EXAMPLES = '''
|
|||
description: Testing creation of firewall policies with ansible - updated
|
||||
|
||||
- name: Add server to a firewall policy
|
||||
oneandone_firewall_policy:
|
||||
community.general.oneandone_firewall_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
firewall_policy: ansible-firewall-policy-updated
|
||||
add_server_ips:
|
||||
|
@ -141,7 +141,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Remove server from a firewall policy
|
||||
oneandone_firewall_policy:
|
||||
community.general.oneandone_firewall_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
firewall_policy: ansible-firewall-policy-updated
|
||||
remove_server_ips:
|
||||
|
@ -151,7 +151,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Add rules to a firewall policy
|
||||
oneandone_firewall_policy:
|
||||
community.general.oneandone_firewall_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
firewall_policy: ansible-firewall-policy-updated
|
||||
description: Adding rules to an existing firewall policy
|
||||
|
@ -171,7 +171,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Remove rules from a firewall policy
|
||||
oneandone_firewall_policy:
|
||||
community.general.oneandone_firewall_policy:
|
||||
auth_token: oneandone_private_api_key
|
||||
firewall_policy: ansible-firewall-policy-updated
|
||||
remove_rules:
|
||||
|
|
|
@ -139,7 +139,7 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a load balancer
|
||||
oneandone_load_balancer:
|
||||
community.general.oneandone_load_balancer:
|
||||
auth_token: oneandone_private_api_key
|
||||
name: ansible load balancer
|
||||
description: Testing creation of load balancer with ansible
|
||||
|
@ -159,7 +159,7 @@ EXAMPLES = '''
|
|||
wait_timeout: 500
|
||||
|
||||
- name: Destroy a load balancer
|
||||
oneandone_load_balancer:
|
||||
community.general.oneandone_load_balancer:
|
||||
auth_token: oneandone_private_api_key
|
||||
name: ansible load balancer
|
||||
wait: true
|
||||
|
@ -167,7 +167,7 @@ EXAMPLES = '''
|
|||
state: absent
|
||||
|
||||
- name: Update a load balancer
|
||||
oneandone_load_balancer:
|
||||
community.general.oneandone_load_balancer:
|
||||
auth_token: oneandone_private_api_key
|
||||
load_balancer: ansible load balancer
|
||||
name: ansible load balancer updated
|
||||
|
@ -177,7 +177,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Add server to a load balancer
|
||||
oneandone_load_balancer:
|
||||
community.general.oneandone_load_balancer:
|
||||
auth_token: oneandone_private_api_key
|
||||
load_balancer: ansible load balancer updated
|
||||
description: Adding server to a load balancer with ansible
|
||||
|
@ -188,7 +188,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Remove server from a load balancer
|
||||
oneandone_load_balancer:
|
||||
community.general.oneandone_load_balancer:
|
||||
auth_token: oneandone_private_api_key
|
||||
load_balancer: ansible load balancer updated
|
||||
description: Removing server from a load balancer with ansible
|
||||
|
@ -199,7 +199,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Add rules to a load balancer
|
||||
oneandone_load_balancer:
|
||||
community.general.oneandone_load_balancer:
|
||||
auth_token: oneandone_private_api_key
|
||||
load_balancer: ansible load balancer updated
|
||||
description: Adding rules to a load balancer with ansible
|
||||
|
@ -219,7 +219,7 @@ EXAMPLES = '''
|
|||
state: update
|
||||
|
||||
- name: Remove rules from a load balancer
|
||||
oneandone_load_balancer:
|
||||
community.general.oneandone_load_balancer:
|
||||
auth_token: oneandone_private_api_key
|
||||
load_balancer: ansible load balancer updated
|
||||
description: Adding rules to a load balancer with ansible
|
||||
|
|
|
@ -92,7 +92,7 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a private network
|
||||
oneandone_private_network:
|
||||
community.general.oneandone_private_network:
|
||||
auth_token: oneandone_private_api_key
|
||||
name: backup_network
|
||||
description: Testing creation of a private network with ansible
|
||||
|
@ -101,13 +101,13 @@ EXAMPLES = '''
|
|||
datacenter: US
|
||||
|
||||
- name: Destroy a private network
|
||||
oneandone_private_network:
|
||||
community.general.oneandone_private_network:
|
||||
auth_token: oneandone_private_api_key
|
||||
state: absent
|
||||
name: backup_network
|
||||
|
||||
- name: Modify the private network
|
||||
oneandone_private_network:
|
||||
community.general.oneandone_private_network:
|
||||
auth_token: oneandone_private_api_key
|
||||
state: update
|
||||
private_network: backup_network
|
||||
|
@ -115,7 +115,7 @@ EXAMPLES = '''
|
|||
subnet_mask: 255.255.255.0
|
||||
|
||||
- name: Add members to the private network
|
||||
oneandone_private_network:
|
||||
community.general.oneandone_private_network:
|
||||
auth_token: oneandone_private_api_key
|
||||
state: update
|
||||
private_network: backup_network
|
||||
|
@ -123,7 +123,7 @@ EXAMPLES = '''
|
|||
- server identifier (id or name)
|
||||
|
||||
- name: Remove members from the private network
|
||||
oneandone_private_network:
|
||||
community.general.oneandone_private_network:
|
||||
auth_token: oneandone_private_api_key
|
||||
state: update
|
||||
private_network: backup_network
|
||||
|
|
|
@ -84,21 +84,21 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create a public IP
|
||||
oneandone_public_ip:
|
||||
community.general.oneandone_public_ip:
|
||||
auth_token: oneandone_private_api_key
|
||||
reverse_dns: example.com
|
||||
datacenter: US
|
||||
type: IPV4
|
||||
|
||||
- name: Update a public IP
|
||||
oneandone_public_ip:
|
||||
community.general.oneandone_public_ip:
|
||||
auth_token: oneandone_private_api_key
|
||||
public_ip_id: public ip id
|
||||
reverse_dns: secondexample.com
|
||||
state: update
|
||||
|
||||
- name: Delete a public IP
|
||||
oneandone_public_ip:
|
||||
community.general.oneandone_public_ip:
|
||||
auth_token: oneandone_private_api_key
|
||||
public_ip_id: public ip id
|
||||
state: absent
|
||||
|
|
|
@ -140,7 +140,7 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Create three servers and enumerate their names
|
||||
oneandone_server:
|
||||
community.general.oneandone_server:
|
||||
auth_token: oneandone_private_api_key
|
||||
hostname: node%02d
|
||||
fixed_instance_size: XL
|
||||
|
@ -150,7 +150,7 @@ EXAMPLES = '''
|
|||
count: 3
|
||||
|
||||
- name: Create three servers, passing in an ssh_key
|
||||
oneandone_server:
|
||||
community.general.oneandone_server:
|
||||
auth_token: oneandone_private_api_key
|
||||
hostname: node%02d
|
||||
vcore: 2
|
||||
|
@ -168,19 +168,19 @@ EXAMPLES = '''
|
|||
ssh_key: SSH_PUBLIC_KEY
|
||||
|
||||
- name: Removing server
|
||||
oneandone_server:
|
||||
community.general.oneandone_server:
|
||||
auth_token: oneandone_private_api_key
|
||||
state: absent
|
||||
server: 'node01'
|
||||
|
||||
- name: Starting server
|
||||
oneandone_server:
|
||||
community.general.oneandone_server:
|
||||
auth_token: oneandone_private_api_key
|
||||
state: running
|
||||
server: 'node01'
|
||||
|
||||
- name: Stopping server
|
||||
oneandone_server:
|
||||
community.general.oneandone_server:
|
||||
auth_token: oneandone_private_api_key
|
||||
state: stopped
|
||||
server: 'node01'
|
||||
|
|
|
@ -27,7 +27,7 @@ extends_documentation_fragment:
|
|||
|
||||
EXAMPLES = r'''
|
||||
- name: Gather Online server facts
|
||||
online_server_facts:
|
||||
community.general.online_server_facts:
|
||||
api_token: '0d1627e8-bbf0-44c5-a46f-5c4d3aef033f'
|
||||
'''
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ extends_documentation_fragment:
|
|||
|
||||
EXAMPLES = r'''
|
||||
- name: Gather Online server information
|
||||
online_server_info:
|
||||
community.general.online_server_info:
|
||||
api_token: '0d1627e8-bbf0-44c5-a46f-5c4d3aef033f'
|
||||
register: result
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ extends_documentation_fragment:
|
|||
|
||||
EXAMPLES = r'''
|
||||
- name: Gather Online user facts
|
||||
online_user_facts:
|
||||
community.general.online_user_facts:
|
||||
'''
|
||||
|
||||
RETURN = r'''
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue