proxmox: fix examples formatting (#248)

* proxmox: fix examples formatting

* fix
pull/250/head
Andrew Klychkov 2020-04-28 17:22:02 +03:00 committed by GitHub
parent eaa484eb37
commit d386506728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 31 additions and 29 deletions

View File

@ -141,9 +141,9 @@ requirements: [ "proxmoxer", "python >= 2.7", "requests" ]
author: Sergei Antipov (@UnderGreen) author: Sergei Antipov (@UnderGreen)
''' '''
EXAMPLES = ''' EXAMPLES = r'''
# Create new container with minimal options - name: Create new container with minimal options
- proxmox: proxmox:
vmid: 100 vmid: 100
node: uk-mc02 node: uk-mc02
api_user: root@pam api_user: root@pam
@ -153,8 +153,8 @@ EXAMPLES = '''
hostname: example.org hostname: example.org
ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
# Create new container automatically selecting the next available vmid. - name: Create new container automatically selecting the next available vmid.
- proxmox: proxmox:
node: 'uk-mc02' node: 'uk-mc02'
api_user: 'root@pam' api_user: 'root@pam'
api_password: '1q2w3e' api_password: '1q2w3e'
@ -163,8 +163,8 @@ EXAMPLES = '''
hostname: 'example.org' hostname: 'example.org'
ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
# Create new container with minimal options with force(it will rewrite existing container) - name: Create new container with minimal options with force(it will rewrite existing container)
- proxmox: proxmox:
vmid: 100 vmid: 100
node: uk-mc02 node: uk-mc02
api_user: root@pam api_user: root@pam
@ -175,8 +175,8 @@ EXAMPLES = '''
ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
force: yes force: yes
# Create new container with minimal options use environment PROXMOX_PASSWORD variable(you should export it before) - name: Create new container with minimal options use environment PROXMOX_PASSWORD variable(you should export it before)
- proxmox: proxmox:
vmid: 100 vmid: 100
node: uk-mc02 node: uk-mc02
api_user: root@pam api_user: root@pam
@ -185,8 +185,8 @@ EXAMPLES = '''
hostname: example.org hostname: example.org
ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
# Create new container with minimal options defining network interface with dhcp - name: Create new container with minimal options defining network interface with dhcp
- proxmox: proxmox:
vmid: 100 vmid: 100
node: uk-mc02 node: uk-mc02
api_user: root@pam api_user: root@pam
@ -197,8 +197,8 @@ EXAMPLES = '''
ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
netif: '{"net0":"name=eth0,ip=dhcp,ip6=dhcp,bridge=vmbr0"}' netif: '{"net0":"name=eth0,ip=dhcp,ip6=dhcp,bridge=vmbr0"}'
# Create new container with minimal options defining network interface with static ip - name: Create new container with minimal options defining network interface with static ip
- proxmox: proxmox:
vmid: 100 vmid: 100
node: uk-mc02 node: uk-mc02
api_user: root@pam api_user: root@pam
@ -209,8 +209,8 @@ EXAMPLES = '''
ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz' ostemplate: 'local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
netif: '{"net0":"name=eth0,gw=192.168.0.1,ip=192.168.0.2/24,bridge=vmbr0"}' netif: '{"net0":"name=eth0,gw=192.168.0.1,ip=192.168.0.2/24,bridge=vmbr0"}'
# Create new container with minimal options defining a mount with 8GB - name: Create new container with minimal options defining a mount with 8GB
- proxmox: proxmox:
vmid: 100 vmid: 100
node: uk-mc02 node: uk-mc02
api_user: root@pam api_user: root@pam
@ -221,8 +221,8 @@ EXAMPLES = '''
ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz' ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
mounts: '{"mp0":"local:8,mp=/mnt/test/"}' mounts: '{"mp0":"local:8,mp=/mnt/test/"}'
# Create new container with minimal options defining a cpu core limit - name: Create new container with minimal options defining a cpu core limit
- proxmox: proxmox:
vmid: 100 vmid: 100
node: uk-mc02 node: uk-mc02
api_user: root@pam api_user: root@pam
@ -233,16 +233,18 @@ EXAMPLES = '''
ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz' ostemplate: local:vztmpl/ubuntu-14.04-x86_64.tar.gz'
cores: 2 cores: 2
# Start container - name: Start container
- proxmox: proxmox:
vmid: 100 vmid: 100
api_user: root@pam api_user: root@pam
api_password: 1q2w3e api_password: 1q2w3e
api_host: node1 api_host: node1
state: started state: started
# Start container with mount. You should enter a 90-second timeout because servers with additional disks take longer to boot. - name: >
- proxmox: Start container with mount. You should enter a 90-second timeout because servers
with additional disks take longer to boot
proxmox:
vmid: 100 vmid: 100
api_user: root@pam api_user: root@pam
api_password: 1q2w3e api_password: 1q2w3e
@ -250,16 +252,16 @@ EXAMPLES = '''
state: started state: started
timeout: 90 timeout: 90
# Stop container - name: Stop container
- proxmox: proxmox:
vmid: 100 vmid: 100
api_user: root@pam api_user: root@pam
api_password: 1q2w3e api_password: 1q2w3e
api_host: node1 api_host: node1
state: stopped state: stopped
# Stop container with force - name: Stop container with force
- proxmox: proxmox:
vmid: 100 vmid: 100
api_user: root@pam api_user: root@pam
api_password: 1q2w3e api_password: 1q2w3e
@ -267,16 +269,16 @@ EXAMPLES = '''
force: yes force: yes
state: stopped state: stopped
# Restart container(stopped or mounted container you can't restart) - name: Restart container(stopped or mounted container you can't restart)
- proxmox: proxmox:
vmid: 100 vmid: 100
api_user: root@pam api_user: root@pam
api_password: 1q2w3e api_password: 1q2w3e
api_host: node1 api_host: node1
state: restarted state: restarted
# Remove container - name: Remove container
- proxmox: proxmox:
vmid: 100 vmid: 100
api_user: root@pam api_user: root@pam
api_password: 1q2w3e api_password: 1q2w3e