mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-10 06:34:13 +00:00
refactor: prefer true/false over yes/no (#226)
* style: format md and yml files using prettier * refactor: prefer true/false over yes/no
This commit is contained in:
parent
97c84e93a4
commit
02516d9a7b
47 changed files with 348 additions and 364 deletions
|
@ -38,7 +38,7 @@ resources:
|
||||||
pool: Standard
|
pool: Standard
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
### Sanity
|
### Sanity
|
||||||
- stage: Ansible_devel
|
- stage: Ansible_devel
|
||||||
displayName: Sanity devel
|
displayName: Sanity devel
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
|
@ -47,8 +47,7 @@ stages:
|
||||||
parameters:
|
parameters:
|
||||||
targets:
|
targets:
|
||||||
- name: Sanity
|
- name: Sanity
|
||||||
test: 'devel/sanity/1'
|
test: "devel/sanity/1"
|
||||||
|
|
||||||
|
|
||||||
- stage: Ansible_2_15
|
- stage: Ansible_2_15
|
||||||
displayName: Sanity 2.15
|
displayName: Sanity 2.15
|
||||||
|
@ -58,7 +57,7 @@ stages:
|
||||||
parameters:
|
parameters:
|
||||||
targets:
|
targets:
|
||||||
- name: Sanity
|
- name: Sanity
|
||||||
test: '2.15/sanity/1'
|
test: "2.15/sanity/1"
|
||||||
- stage: Ansible_2_14
|
- stage: Ansible_2_14
|
||||||
displayName: Sanity 2.14
|
displayName: Sanity 2.14
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
|
@ -67,7 +66,7 @@ stages:
|
||||||
parameters:
|
parameters:
|
||||||
targets:
|
targets:
|
||||||
- name: Sanity
|
- name: Sanity
|
||||||
test: '2.14/sanity/1'
|
test: "2.14/sanity/1"
|
||||||
- stage: Ansible_2_13
|
- stage: Ansible_2_13
|
||||||
displayName: Sanity 2.13
|
displayName: Sanity 2.13
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
|
@ -76,7 +75,7 @@ stages:
|
||||||
parameters:
|
parameters:
|
||||||
targets:
|
targets:
|
||||||
- name: Sanity
|
- name: Sanity
|
||||||
test: '2.13/sanity/1'
|
test: "2.13/sanity/1"
|
||||||
- stage: Ansible_2_12
|
- stage: Ansible_2_12
|
||||||
displayName: Sanity 2.12
|
displayName: Sanity 2.12
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
|
@ -85,10 +84,9 @@ stages:
|
||||||
parameters:
|
parameters:
|
||||||
targets:
|
targets:
|
||||||
- name: Sanity
|
- name: Sanity
|
||||||
test: '2.12/sanity/1'
|
test: "2.12/sanity/1"
|
||||||
|
|
||||||
|
## Integration tests (remote)
|
||||||
## Integration tests (remote)
|
|
||||||
- stage: Hetzner_devel
|
- stage: Hetzner_devel
|
||||||
displayName: Hetzner devel
|
displayName: Hetzner devel
|
||||||
dependsOn: []
|
dependsOn: []
|
||||||
|
@ -101,7 +99,7 @@ stages:
|
||||||
- 3
|
- 3
|
||||||
targets:
|
targets:
|
||||||
- name: hcloud
|
- name: hcloud
|
||||||
test: 'devel/hcloud/3.9'
|
test: "devel/hcloud/3.9"
|
||||||
|
|
||||||
- stage: Hetzner_2_15
|
- stage: Hetzner_2_15
|
||||||
displayName: Hetzner 2.15
|
displayName: Hetzner 2.15
|
||||||
|
@ -115,7 +113,7 @@ stages:
|
||||||
- 3
|
- 3
|
||||||
targets:
|
targets:
|
||||||
- name: hcloud
|
- name: hcloud
|
||||||
test: '2.15/hcloud/3.9'
|
test: "2.15/hcloud/3.9"
|
||||||
|
|
||||||
- stage: Hetzner_2_14
|
- stage: Hetzner_2_14
|
||||||
displayName: Hetzner 2.14
|
displayName: Hetzner 2.14
|
||||||
|
@ -129,7 +127,7 @@ stages:
|
||||||
- 3
|
- 3
|
||||||
targets:
|
targets:
|
||||||
- name: hcloud
|
- name: hcloud
|
||||||
test: '2.14/hcloud/3.9'
|
test: "2.14/hcloud/3.9"
|
||||||
|
|
||||||
- stage: Hetzner_2_13
|
- stage: Hetzner_2_13
|
||||||
displayName: Hetzner 2.13
|
displayName: Hetzner 2.13
|
||||||
|
@ -143,7 +141,7 @@ stages:
|
||||||
- 3
|
- 3
|
||||||
targets:
|
targets:
|
||||||
- name: hcloud
|
- name: hcloud
|
||||||
test: '2.13/hcloud/3.9'
|
test: "2.13/hcloud/3.9"
|
||||||
|
|
||||||
- stage: Hetzner_2_12
|
- stage: Hetzner_2_12
|
||||||
displayName: Hetzner 2.12
|
displayName: Hetzner 2.12
|
||||||
|
@ -157,9 +155,9 @@ stages:
|
||||||
- 3
|
- 3
|
||||||
targets:
|
targets:
|
||||||
- name: hcloud
|
- name: hcloud
|
||||||
test: '2.12/hcloud/3.9'
|
test: "2.12/hcloud/3.9"
|
||||||
|
|
||||||
### Finally
|
### Finally
|
||||||
- stage: Summary
|
- stage: Summary
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
dependsOn:
|
dependsOn:
|
||||||
|
|
|
@ -45,11 +45,11 @@ jobs:
|
||||||
parameters:
|
parameters:
|
||||||
jobs:
|
jobs:
|
||||||
- ${{ if eq(length(parameters.groups), 0) }}:
|
- ${{ if eq(length(parameters.groups), 0) }}:
|
||||||
- ${{ each target in parameters.targets }}:
|
|
||||||
- name: ${{ format(parameters.nameFormat, coalesce(target.name, target.test)) }}
|
|
||||||
test: ${{ format(parameters.testFormat, coalesce(target.test, target.name)) }}
|
|
||||||
- ${{ if not(eq(length(parameters.groups), 0)) }}:
|
|
||||||
- ${{ each group in parameters.groups }}:
|
|
||||||
- ${{ each target in parameters.targets }}:
|
- ${{ each target in parameters.targets }}:
|
||||||
- name: ${{ format(format(parameters.nameGroupFormat, parameters.nameFormat), coalesce(target.name, target.test), group) }}
|
- name: ${{ format(parameters.nameFormat, coalesce(target.name, target.test)) }}
|
||||||
test: ${{ format(format(parameters.testGroupFormat, parameters.testFormat), coalesce(target.test, target.name), group) }}
|
test: ${{ format(parameters.testFormat, coalesce(target.test, target.name)) }}
|
||||||
|
- ${{ if not(eq(length(parameters.groups), 0)) }}:
|
||||||
|
- ${{ each group in parameters.groups }}:
|
||||||
|
- ${{ each target in parameters.targets }}:
|
||||||
|
- name: ${{ format(format(parameters.nameGroupFormat, parameters.nameFormat), coalesce(target.name, target.test), group) }}
|
||||||
|
test: ${{ format(format(parameters.testGroupFormat, parameters.testFormat), coalesce(target.test, target.name), group) }}
|
||||||
|
|
|
@ -9,37 +9,37 @@ parameters:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- ${{ each job in parameters.jobs }}:
|
- ${{ each job in parameters.jobs }}:
|
||||||
- job: test_${{ replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_') }}
|
- job: test_${{ replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_') }}
|
||||||
displayName: ${{ job.name }}
|
displayName: ${{ job.name }}
|
||||||
container: default
|
container: default
|
||||||
workspace:
|
workspace:
|
||||||
clean: all
|
clean: all
|
||||||
steps:
|
steps:
|
||||||
- checkout: self
|
- checkout: self
|
||||||
fetchDepth: $(fetchDepth)
|
fetchDepth: $(fetchDepth)
|
||||||
path: $(checkoutPath)
|
path: $(checkoutPath)
|
||||||
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
|
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
|
||||||
displayName: Run Tests
|
displayName: Run Tests
|
||||||
- bash: .azure-pipelines/scripts/process-results.sh
|
- bash: .azure-pipelines/scripts/process-results.sh
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
displayName: Process Results
|
displayName: Process Results
|
||||||
- bash: .azure-pipelines/scripts/aggregate-coverage.sh "$(Agent.TempDirectory)"
|
- bash: .azure-pipelines/scripts/aggregate-coverage.sh "$(Agent.TempDirectory)"
|
||||||
condition: eq(variables.haveCoverageData, 'true')
|
condition: eq(variables.haveCoverageData, 'true')
|
||||||
displayName: Aggregate Coverage Data
|
displayName: Aggregate Coverage Data
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
condition: eq(variables.haveTestResults, 'true')
|
condition: eq(variables.haveTestResults, 'true')
|
||||||
inputs:
|
inputs:
|
||||||
testResultsFiles: "$(outputPath)/junit/*.xml"
|
testResultsFiles: "$(outputPath)/junit/*.xml"
|
||||||
displayName: Publish Test Results
|
displayName: Publish Test Results
|
||||||
- task: PublishPipelineArtifact@1
|
- task: PublishPipelineArtifact@1
|
||||||
condition: eq(variables.haveBotResults, 'true')
|
condition: eq(variables.haveBotResults, 'true')
|
||||||
displayName: Publish Bot Results
|
displayName: Publish Bot Results
|
||||||
inputs:
|
inputs:
|
||||||
targetPath: "$(outputPath)/bot/"
|
targetPath: "$(outputPath)/bot/"
|
||||||
artifactName: "Bot $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
|
artifactName: "Bot $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
|
||||||
- task: PublishPipelineArtifact@1
|
- task: PublishPipelineArtifact@1
|
||||||
condition: eq(variables.haveCoverageData, 'true')
|
condition: eq(variables.haveCoverageData, 'true')
|
||||||
displayName: Publish Coverage Data
|
displayName: Publish Coverage Data
|
||||||
inputs:
|
inputs:
|
||||||
targetPath: "$(Agent.TempDirectory)/coverage/"
|
targetPath: "$(Agent.TempDirectory)/coverage/"
|
||||||
artifactName: "Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
|
artifactName: "Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
|
||||||
|
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install antsibull-changelog
|
pip install antsibull-changelog
|
||||||
- name: test with lint
|
- name: test with lint
|
||||||
run: antsibull-changelog lint
|
run: antsibull-changelog lint
|
||||||
|
|
1
COPYING
1
COPYING
|
@ -672,4 +672,3 @@ may consider it more useful to permit linking proprietary applications with
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
Public License instead of this License. But first, please read
|
Public License instead of this License. But first, please read
|
||||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
|
|
||||||
|
|
|
@ -10,19 +10,19 @@ notesdir: fragments
|
||||||
prelude_section_name: release_summary
|
prelude_section_name: release_summary
|
||||||
prelude_section_title: Release Summary
|
prelude_section_title: Release Summary
|
||||||
sections:
|
sections:
|
||||||
- - major_changes
|
- - major_changes
|
||||||
- Major Changes
|
- Major Changes
|
||||||
- - minor_changes
|
- - minor_changes
|
||||||
- Minor Changes
|
- Minor Changes
|
||||||
- - breaking_changes
|
- - breaking_changes
|
||||||
- Breaking Changes / Porting Guide
|
- Breaking Changes / Porting Guide
|
||||||
- - deprecated_features
|
- - deprecated_features
|
||||||
- Deprecated Features
|
- Deprecated Features
|
||||||
- - removed_features
|
- - removed_features
|
||||||
- Removed Features (previously deprecated)
|
- Removed Features (previously deprecated)
|
||||||
- - security_fixes
|
- - security_fixes
|
||||||
- Security Fixes
|
- Security Fixes
|
||||||
- - bugfixes
|
- - bugfixes
|
||||||
- Bugfixes
|
- Bugfixes
|
||||||
- - known_issues
|
- - known_issues
|
||||||
- Known Issues
|
- Known Issues
|
||||||
|
|
|
@ -11,7 +11,7 @@ tags:
|
||||||
- cloud
|
- cloud
|
||||||
- hcloud
|
- hcloud
|
||||||
dependencies:
|
dependencies:
|
||||||
ansible.netcommon: '>=0.0.1'
|
ansible.netcommon: ">=0.0.1"
|
||||||
repository: https://github.com/ansible-collections/hetzner.hcloud
|
repository: https://github.com/ansible-collections/hetzner.hcloud
|
||||||
documentation: https://docs.ansible.com/ansible/latest/collections/hetzner/hcloud
|
documentation: https://docs.ansible.com/ansible/latest/collections/hetzner/hcloud
|
||||||
homepage: https://github.com/ansible-collections/hetzner.hcloud
|
homepage: https://github.com/ansible-collections/hetzner.hcloud
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
requires_ansible: '>=2.12.0'
|
requires_ansible: ">=2.12.0"
|
||||||
plugin_routing:
|
plugin_routing:
|
||||||
modules:
|
modules:
|
||||||
hcloud_location_facts:
|
hcloud_location_facts:
|
||||||
|
|
|
@ -101,7 +101,7 @@ EXAMPLES = """
|
||||||
hcloud_floating_ip:
|
hcloud_floating_ip:
|
||||||
name: my-floating-ip
|
name: my-floating-ip
|
||||||
server: 1234
|
server: 1234
|
||||||
force: yes
|
force: true
|
||||||
state: present
|
state: present
|
||||||
- name: Floating IP should be absent
|
- name: Floating IP should be absent
|
||||||
hcloud_floating_ip:
|
hcloud_floating_ip:
|
||||||
|
@ -264,7 +264,7 @@ class AnsibleHcloudFloatingIP(Hcloud):
|
||||||
self._mark_as_changed()
|
self._mark_as_changed()
|
||||||
elif server != self.hcloud_floating_ip.server.name:
|
elif server != self.hcloud_floating_ip.server.name:
|
||||||
self.module.warn(
|
self.module.warn(
|
||||||
"Floating IP is already assigned to another server %s. You need to unassign the Floating IP or use force=yes."
|
"Floating IP is already assigned to another server %s. You need to unassign the Floating IP or use force=true."
|
||||||
% self.hcloud_floating_ip.server.name
|
% self.hcloud_floating_ip.server.name
|
||||||
)
|
)
|
||||||
self._mark_as_changed()
|
self._mark_as_changed()
|
||||||
|
@ -305,7 +305,7 @@ class AnsibleHcloudFloatingIP(Hcloud):
|
||||||
self.client.floating_ips.delete(self.hcloud_floating_ip)
|
self.client.floating_ips.delete(self.hcloud_floating_ip)
|
||||||
else:
|
else:
|
||||||
self.module.warn(
|
self.module.warn(
|
||||||
"Floating IP is currently assigned to server %s. You need to unassign the Floating IP or use force=yes."
|
"Floating IP is currently assigned to server %s. You need to unassign the Floating IP or use force=true."
|
||||||
% self.hcloud_floating_ip.server.name
|
% self.hcloud_floating_ip.server.name
|
||||||
)
|
)
|
||||||
self._mark_as_changed()
|
self._mark_as_changed()
|
||||||
|
|
|
@ -78,17 +78,17 @@ options:
|
||||||
- Resize the disk size, when resizing a server.
|
- Resize the disk size, when resizing a server.
|
||||||
- If you want to downgrade the server later, this value should be False.
|
- If you want to downgrade the server later, this value should be False.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
enable_ipv4:
|
enable_ipv4:
|
||||||
description:
|
description:
|
||||||
- Enables the public ipv4 address
|
- Enables the public ipv4 address
|
||||||
type: bool
|
type: bool
|
||||||
default: yes
|
default: true
|
||||||
enable_ipv6:
|
enable_ipv6:
|
||||||
description:
|
description:
|
||||||
- Enables the public ipv6 address
|
- Enables the public ipv6 address
|
||||||
type: bool
|
type: bool
|
||||||
default: yes
|
default: true
|
||||||
ipv4:
|
ipv4:
|
||||||
description:
|
description:
|
||||||
- ID of the ipv4 Primary IP to use. If omitted and enable_ipv4 is true, a new ipv4 Primary IP will automatically be created
|
- ID of the ipv4 Primary IP to use. If omitted and enable_ipv4 is true, a new ipv4 Primary IP will automatically be created
|
||||||
|
@ -115,12 +115,12 @@ options:
|
||||||
- Force the update of the server.
|
- Force the update of the server.
|
||||||
- May power off the server if update.
|
- May power off the server if update.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
allow_deprecated_image:
|
allow_deprecated_image:
|
||||||
description:
|
description:
|
||||||
- Allows the creation of servers with deprecated images.
|
- Allows the creation of servers with deprecated images.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: false
|
||||||
user_data:
|
user_data:
|
||||||
description:
|
description:
|
||||||
- User Data to be passed to the server on creation.
|
- User Data to be passed to the server on creation.
|
||||||
|
@ -181,7 +181,7 @@ EXAMPLES = """
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
name: my-server
|
name: my-server
|
||||||
server_type: cx21
|
server_type: cx21
|
||||||
upgrade_disk: yes
|
upgrade_disk: true
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Ensure the server is absent (remove if needed)
|
- name: Ensure the server is absent (remove if needed)
|
||||||
|
@ -522,7 +522,7 @@ class AnsibleHcloudServer(Hcloud):
|
||||||
else:
|
else:
|
||||||
self.module.fail_json(
|
self.module.fail_json(
|
||||||
msg=("You try to use a deprecated image. The image %s will continue to be available until %s." +
|
msg=("You try to use a deprecated image. The image %s will continue to be available until %s." +
|
||||||
" If you want to use this image use allow_deprecated_image=yes."
|
" If you want to use this image use allow_deprecated_image=true."
|
||||||
) % (image.name, available_until.strftime('%Y-%m-%d')))
|
) % (image.name, available_until.strftime('%Y-%m-%d')))
|
||||||
return image
|
return image
|
||||||
|
|
||||||
|
@ -844,7 +844,7 @@ class AnsibleHcloudServer(Hcloud):
|
||||||
return previous_server_status
|
return previous_server_status
|
||||||
else:
|
else:
|
||||||
self.module.warn(
|
self.module.warn(
|
||||||
"You can not upgrade a running instance %s. You need to stop the instance or use force=yes."
|
"You can not upgrade a running instance %s. You need to stop the instance or use force=true."
|
||||||
% self.hcloud_server.name
|
% self.hcloud_server.name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -95,13 +95,13 @@ EXAMPLES = """
|
||||||
hcloud_volume:
|
hcloud_volume:
|
||||||
name: my-volume
|
name: my-volume
|
||||||
server: my-server
|
server: my-server
|
||||||
automount: yes
|
automount: true
|
||||||
state: present
|
state: present
|
||||||
- name: Mount a existing Volume and automount
|
- name: Mount a existing Volume and automount
|
||||||
hcloud_volume:
|
hcloud_volume:
|
||||||
name: my-volume
|
name: my-volume
|
||||||
server: my-server
|
server: my-server
|
||||||
automount: yes
|
automount: true
|
||||||
state: present
|
state: present
|
||||||
- name: Ensure the Volume is absent (remove if needed)
|
- name: Ensure the Volume is absent (remove if needed)
|
||||||
hcloud_volume:
|
hcloud_volume:
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
hcloud_certificate:
|
hcloud_certificate:
|
||||||
name: "{{ hcloud_certificate_name }}"
|
name: "{{ hcloud_certificate_name }}"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters on create certificate
|
- name: verify fail test missing required parameters on create certificate
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
certificate: "{{ certificate_example_com }}"
|
certificate: "{{ certificate_example_com }}"
|
||||||
private_key: "{{ certificate_example_com_key }}"
|
private_key: "{{ certificate_example_com_key }}"
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: test create certificate with check mode
|
- name: test create certificate with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
id: "{{ certificate.hcloud_certificate.id }}"
|
id: "{{ certificate.hcloud_certificate.id }}"
|
||||||
name: "changed-{{ hcloud_certificate_name }}"
|
name: "changed-{{ hcloud_certificate_name }}"
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: test create certificate with check mode
|
- name: test create certificate with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
|
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: create certificate
|
- name: create certificate
|
||||||
hcloud_certificate:
|
hcloud_certificate:
|
||||||
name: "{{ hcloud_certificate_name }}"
|
name: "{{ hcloud_certificate_name }}"
|
||||||
|
@ -22,20 +21,20 @@
|
||||||
- name: test gather hcloud certificate infos in check mode
|
- name: test gather hcloud certificate infos in check mode
|
||||||
hcloud_certificate_info:
|
hcloud_certificate_info:
|
||||||
register: hcloud_certificate
|
register: hcloud_certificate
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test gather hcloud certificate infos in check mode
|
- name: verify test gather hcloud certificate infos in check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- hcloud_certificate.hcloud_certificate_info| list | count >= 1
|
- hcloud_certificate.hcloud_certificate_info| list | count >= 1
|
||||||
|
|
||||||
- name: test gather hcloud certificate infos
|
- name: test gather hcloud certificate infos
|
||||||
hcloud_certificate_info:
|
hcloud_certificate_info:
|
||||||
register: hcloud_certificate
|
register: hcloud_certificate
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test gather hcloud certificate infos
|
- name: verify test gather hcloud certificate infos
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- hcloud_certificate.hcloud_certificate_info| list | count >= 1
|
- hcloud_certificate.hcloud_certificate_info| list | count >= 1
|
||||||
|
|
||||||
- name: test gather hcloud certificate infos with correct label selector
|
- name: test gather hcloud certificate infos with correct label selector
|
||||||
hcloud_certificate_info:
|
hcloud_certificate_info:
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
- name: test gather hcloud datacenter infos in check mode
|
- name: test gather hcloud datacenter infos in check mode
|
||||||
hcloud_datacenter_info:
|
hcloud_datacenter_info:
|
||||||
register: hcloud_datacenters
|
register: hcloud_datacenters
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: verify test gather hcloud datacenter infos in check mode
|
- name: verify test gather hcloud datacenter infos in check mode
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
- name: test missing required parameters on create firewall
|
- name: test missing required parameters on create firewall
|
||||||
hcloud_firewall:
|
hcloud_firewall:
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters on create firewall
|
- name: verify fail test missing required parameters on create firewall
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
hcloud_firewall:
|
hcloud_firewall:
|
||||||
name: "{{ hcloud_firewall_name }}"
|
name: "{{ hcloud_firewall_name }}"
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: test create firewall with check mode
|
- name: test create firewall with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
id: "{{ firewall.hcloud_firewall.id }}"
|
id: "{{ firewall.hcloud_firewall.id }}"
|
||||||
name: "changed-{{ hcloud_firewall_name }}"
|
name: "changed-{{ hcloud_firewall_name }}"
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: test create firewall with check mode
|
- name: test create firewall with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
hcloud_floating_ip:
|
hcloud_floating_ip:
|
||||||
name: "{{ hcloud_floating_ip_name }}"
|
name: "{{ hcloud_floating_ip_name }}"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing type parameter on create Floating IP
|
- name: verify fail test missing type parameter on create Floating IP
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
name: "{{ hcloud_floating_ip_name }}"
|
name: "{{ hcloud_floating_ip_name }}"
|
||||||
type: ipv4
|
type: ipv4
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters on create Floating IP
|
- name: verify fail test missing required parameters on create Floating IP
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
home_location: "fsn1"
|
home_location: "fsn1"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing type parameter on delete Floating IP
|
- name: verify fail test missing type parameter on delete Floating IP
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
type: ipv5
|
type: ipv5
|
||||||
home_location: "fsn1"
|
home_location: "fsn1"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify invalid type
|
- name: verify invalid type
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
type: ipv4
|
type: ipv4
|
||||||
home_location: "abc"
|
home_location: "abc"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify invalid location
|
- name: verify invalid location
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
type: ipv4
|
type: ipv4
|
||||||
home_location: "fsn1"
|
home_location: "fsn1"
|
||||||
register: floatingIP
|
register: floatingIP
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test create Floating IP with check mode
|
- name: verify test create Floating IP with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
description: "changed-description"
|
description: "changed-description"
|
||||||
type: ipv4
|
type: ipv4
|
||||||
home_location: "fsn1"
|
home_location: "fsn1"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: floatingIP
|
register: floatingIP
|
||||||
- name: verify test create Floating IP with check mode
|
- name: verify test create Floating IP with check mode
|
||||||
assert:
|
assert:
|
||||||
|
@ -233,7 +233,7 @@
|
||||||
description: "changed-description"
|
description: "changed-description"
|
||||||
type: ipv4
|
type: ipv4
|
||||||
server: "{{ main_server.hcloud_server.name }}"
|
server: "{{ main_server.hcloud_server.name }}"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: floatingIP
|
register: floatingIP
|
||||||
- name: verify test assign Floating IP with checkmode
|
- name: verify test assign Floating IP with checkmode
|
||||||
assert:
|
assert:
|
||||||
|
@ -317,7 +317,7 @@
|
||||||
hcloud_floating_ip:
|
hcloud_floating_ip:
|
||||||
name: "{{ hcloud_floating_ip_name }}"
|
name: "{{ hcloud_floating_ip_name }}"
|
||||||
type: ipv4
|
type: ipv4
|
||||||
force: yes
|
force: true
|
||||||
server: "{{ main_server2.hcloud_server.name }}"
|
server: "{{ main_server2.hcloud_server.name }}"
|
||||||
register: floatingIP
|
register: floatingIP
|
||||||
- name: verify test already assigned Floating IP assign with force
|
- name: verify test already assigned Floating IP assign with force
|
||||||
|
@ -366,7 +366,7 @@
|
||||||
name: "{{ hcloud_floating_ip_name }}"
|
name: "{{ hcloud_floating_ip_name }}"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify test delete floating ip
|
- name: verify test delete floating ip
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -454,7 +454,7 @@
|
||||||
name: "{{ hcloud_floating_ip_name }}"
|
name: "{{ hcloud_floating_ip_name }}"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify test delete floating ip
|
- name: verify test delete floating ip
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud floating ip infos in check mode
|
- name: test gather hcloud floating ip infos in check mode
|
||||||
hcloud_floating_ip_info:
|
hcloud_floating_ip_info:
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: hcloud_floating_ips
|
register: hcloud_floating_ips
|
||||||
|
|
||||||
- name: verify test gather hcloud floating ip infos in check mode
|
- name: verify test gather hcloud floating ip infos in check mode
|
||||||
|
@ -38,7 +38,6 @@
|
||||||
that:
|
that:
|
||||||
- hcloud_floating_ips.hcloud_floating_ip_info| list | count >= 1
|
- hcloud_floating_ips.hcloud_floating_ip_info| list | count >= 1
|
||||||
|
|
||||||
|
|
||||||
- name: test gather hcloud floating ip infos with correct label selector
|
- name: test gather hcloud floating ip infos with correct label selector
|
||||||
hcloud_floating_ip_info:
|
hcloud_floating_ip_info:
|
||||||
label_selector: "key=value"
|
label_selector: "key=value"
|
||||||
|
@ -68,9 +67,9 @@
|
||||||
|
|
||||||
- name: test gather hcloud floating ip infos with wrong id
|
- name: test gather hcloud floating ip infos with wrong id
|
||||||
hcloud_floating_ip_info:
|
hcloud_floating_ip_info:
|
||||||
id: "{{test_floating_ip.hcloud_floating_ip.id}}1"
|
id: "{{test_floating_ip.hcloud_floating_ip.id}}1"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify test gather hcloud floating ip with wrong id
|
- name: verify test gather hcloud floating ip with wrong id
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -84,4 +83,4 @@
|
||||||
- name: verify cleanup
|
- name: verify cleanup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud image infos in check mode
|
- name: test gather hcloud image infos in check mode
|
||||||
hcloud_image_info:
|
hcloud_image_info:
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: hcloud_images
|
register: hcloud_images
|
||||||
|
|
||||||
- name: verify test gather hcloud image infos in check mode
|
- name: verify test gather hcloud image infos in check mode
|
||||||
|
@ -19,7 +19,6 @@
|
||||||
that:
|
that:
|
||||||
- hcloud_images.hcloud_image_info| list | count > 2
|
- hcloud_images.hcloud_image_info| list | count > 2
|
||||||
|
|
||||||
|
|
||||||
- name: test gather hcloud image infos with correct label selector
|
- name: test gather hcloud image infos with correct label selector
|
||||||
hcloud_image_info:
|
hcloud_image_info:
|
||||||
label_selector: "key=value"
|
label_selector: "key=value"
|
||||||
|
@ -52,9 +51,9 @@
|
||||||
|
|
||||||
- name: test gather hcloud image infos with wrong id
|
- name: test gather hcloud image infos with wrong id
|
||||||
hcloud_image_info:
|
hcloud_image_info:
|
||||||
id: "{{hcloud_test_image_id}}1"
|
id: "{{hcloud_test_image_id}}1"
|
||||||
type: snapshot
|
type: snapshot
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify test gather hcloud image with wrong id
|
- name: verify test gather hcloud image with wrong id
|
||||||
assert:
|
assert:
|
||||||
|
@ -63,7 +62,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud image infos with name
|
- name: test gather hcloud image infos with name
|
||||||
hcloud_image_info:
|
hcloud_image_info:
|
||||||
name: "{{ hcloud_test_image_name_os }}"
|
name: "{{ hcloud_test_image_name_os }}"
|
||||||
register: hcloud_images
|
register: hcloud_images
|
||||||
- name: verify test gather hcloud image infos with name
|
- name: verify test gather hcloud image infos with name
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
- name: verify setup
|
- name: verify setup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
- name: test missing required parameters on create Load Balancer
|
- name: test missing required parameters on create Load Balancer
|
||||||
hcloud_load_balancer:
|
hcloud_load_balancer:
|
||||||
name: "{{ hcloud_load_balancer_name }}"
|
name: "{{ hcloud_load_balancer_name }}"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters on create Load Balancer
|
- name: verify fail test missing required parameters on create Load Balancer
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
network_zone: eu-central
|
network_zone: eu-central
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: test create Load Balancer with check mode
|
- name: test create Load Balancer with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
hcloud_load_balancer:
|
hcloud_load_balancer:
|
||||||
name: "{{hcloud_load_balancer_name}}"
|
name: "{{hcloud_load_balancer_name}}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify delete Load Balancer fails if it is protected
|
- name: verify delete Load Balancer fails if it is protected
|
||||||
assert:
|
assert:
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
- name: verify absent Load Balancer
|
- name: verify absent Load Balancer
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
- name: test create Load Balancer with labels
|
- name: test create Load Balancer with labels
|
||||||
hcloud_load_balancer:
|
hcloud_load_balancer:
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
- name: verify cleanup
|
- name: verify cleanup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
- name: test create Load Balancer with delete protection
|
- name: test create Load Balancer with delete protection
|
||||||
hcloud_load_balancer:
|
hcloud_load_balancer:
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
name: "{{ hcloud_load_balancer_name }}"
|
name: "{{ hcloud_load_balancer_name }}"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify test delete Load Balancer
|
- name: verify test delete Load Balancer
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
- name: verify create load_balancer target
|
- name: verify create load_balancer target
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancer_target is success
|
- load_balancer_target is success
|
||||||
- name: test create load_balancer service
|
- name: test create load_balancer service
|
||||||
hcloud_load_balancer_service:
|
hcloud_load_balancer_service:
|
||||||
load_balancer: "{{hcloud_load_balancer_name}}"
|
load_balancer: "{{hcloud_load_balancer_name}}"
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
- name: verify create load_balancer service
|
- name: verify create load_balancer service
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancer_service is success
|
- load_balancer_service is success
|
||||||
|
|
||||||
- name: test gather hcloud Load Balancer infos
|
- name: test gather hcloud Load Balancer infos
|
||||||
hcloud_load_balancer_info:
|
hcloud_load_balancer_info:
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud Load Balancer infos in check mode
|
- name: test gather hcloud Load Balancer infos in check mode
|
||||||
hcloud_load_balancer_info:
|
hcloud_load_balancer_info:
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: hcloud_load_balancers
|
register: hcloud_load_balancers
|
||||||
|
|
||||||
- name: verify test gather hcloud Load Balancer infos in check mode
|
- name: verify test gather hcloud Load Balancer infos in check mode
|
||||||
|
@ -79,7 +79,6 @@
|
||||||
that:
|
that:
|
||||||
- hcloud_load_balancers.hcloud_load_balancer_info| list | count >= 1
|
- hcloud_load_balancers.hcloud_load_balancer_info| list | count >= 1
|
||||||
|
|
||||||
|
|
||||||
- name: test gather hcloud Load Balancer infos with correct label selector
|
- name: test gather hcloud Load Balancer infos with correct label selector
|
||||||
hcloud_load_balancer_info:
|
hcloud_load_balancer_info:
|
||||||
label_selector: "key=value"
|
label_selector: "key=value"
|
||||||
|
@ -109,9 +108,9 @@
|
||||||
|
|
||||||
- name: test gather hcloud Load Balancer infos with wrong id
|
- name: test gather hcloud Load Balancer infos with wrong id
|
||||||
hcloud_load_balancer_info:
|
hcloud_load_balancer_info:
|
||||||
id: "{{test_load_balancer.hcloud_load_balancer.id}}1"
|
id: "{{test_load_balancer.hcloud_load_balancer.id}}1"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify test gather hcloud Load Balancer with wrong id
|
- name: verify test gather hcloud Load Balancer with wrong id
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -125,4 +124,4 @@
|
||||||
- name: verify cleanup
|
- name: verify cleanup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
- name: verify setup network
|
- name: verify setup network
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- network is success
|
- network is success
|
||||||
|
|
||||||
- name: setup subnetwork
|
- name: setup subnetwork
|
||||||
hcloud_subnetwork:
|
hcloud_subnetwork:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
- name: verify subnetwork
|
- name: verify subnetwork
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- subnetwork is success
|
- subnetwork is success
|
||||||
|
|
||||||
- name: setup load_balancer
|
- name: setup load_balancer
|
||||||
hcloud_load_balancer:
|
hcloud_load_balancer:
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
hcloud_load_balancer_network:
|
hcloud_load_balancer_network:
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters on create load_balancer network
|
- name: verify fail test missing required parameters on create load_balancer network
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -80,11 +80,11 @@
|
||||||
load_balancer: "{{hcloud_load_balancer_name}}"
|
load_balancer: "{{hcloud_load_balancer_name}}"
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test create load_balancer network with checkmode
|
- name: verify test create load_balancer network with checkmode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test create load_balancer network
|
- name: test create load_balancer network
|
||||||
hcloud_load_balancer_network:
|
hcloud_load_balancer_network:
|
||||||
|
@ -95,9 +95,9 @@
|
||||||
- name: verify create load_balancer network
|
- name: verify create load_balancer network
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancerNetwork is changed
|
- load_balancerNetwork is changed
|
||||||
- load_balancerNetwork.hcloud_load_balancer_network.network == hcloud_network_name
|
- load_balancerNetwork.hcloud_load_balancer_network.network == hcloud_network_name
|
||||||
- load_balancerNetwork.hcloud_load_balancer_network.load_balancer == hcloud_load_balancer_name
|
- load_balancerNetwork.hcloud_load_balancer_network.load_balancer == hcloud_load_balancer_name
|
||||||
|
|
||||||
- name: test create load_balancer network idempotency
|
- name: test create load_balancer network idempotency
|
||||||
hcloud_load_balancer_network:
|
hcloud_load_balancer_network:
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
- name: verify create load_balancer network idempotency
|
- name: verify create load_balancer network idempotency
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancerNetwork is not changed
|
- load_balancerNetwork is not changed
|
||||||
|
|
||||||
- name: test absent load_balancer network
|
- name: test absent load_balancer network
|
||||||
hcloud_load_balancer_network:
|
hcloud_load_balancer_network:
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
- name: verify test absent load_balancer network
|
- name: verify test absent load_balancer network
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test create load_balancer network with specified ip
|
- name: test create load_balancer network with specified ip
|
||||||
hcloud_load_balancer_network:
|
hcloud_load_balancer_network:
|
||||||
|
@ -131,10 +131,10 @@
|
||||||
- name: verify create load_balancer network with specified ip
|
- name: verify create load_balancer network with specified ip
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancerNetwork is changed
|
- load_balancerNetwork is changed
|
||||||
- load_balancerNetwork.hcloud_load_balancer_network.network == hcloud_network_name
|
- load_balancerNetwork.hcloud_load_balancer_network.network == hcloud_network_name
|
||||||
- load_balancerNetwork.hcloud_load_balancer_network.load_balancer == hcloud_load_balancer_name
|
- load_balancerNetwork.hcloud_load_balancer_network.load_balancer == hcloud_load_balancer_name
|
||||||
- load_balancerNetwork.hcloud_load_balancer_network.ip == "10.0.0.2"
|
- load_balancerNetwork.hcloud_load_balancer_network.ip == "10.0.0.2"
|
||||||
|
|
||||||
- name: cleanup create load_balancer network with specified ip
|
- name: cleanup create load_balancer network with specified ip
|
||||||
hcloud_load_balancer_network:
|
hcloud_load_balancer_network:
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
- name: verify cleanup create load_balancer network with specified ip
|
- name: verify cleanup create load_balancer network with specified ip
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: cleanup load_balancer
|
- name: cleanup load_balancer
|
||||||
hcloud_load_balancer:
|
hcloud_load_balancer:
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
- name: verify cleanup load_balancer
|
- name: verify cleanup load_balancer
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
- name: cleanup subnetwork
|
- name: cleanup subnetwork
|
||||||
hcloud_subnetwork:
|
hcloud_subnetwork:
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
- name: verify cleanup subnetwork
|
- name: verify cleanup subnetwork
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: cleanup
|
- name: cleanup
|
||||||
hcloud_network:
|
hcloud_network:
|
||||||
|
|
|
@ -34,11 +34,11 @@
|
||||||
listen_port: 80
|
listen_port: 80
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test create load_balancer service with checkmode
|
- name: verify test create load_balancer service with checkmode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test create load_balancer service
|
- name: test create load_balancer service
|
||||||
hcloud_load_balancer_service:
|
hcloud_load_balancer_service:
|
||||||
|
@ -50,11 +50,11 @@
|
||||||
- name: verify create load_balancer service
|
- name: verify create load_balancer service
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancer_service is changed
|
- load_balancer_service is changed
|
||||||
- load_balancer_service.hcloud_load_balancer_service.protocol == "http"
|
- load_balancer_service.hcloud_load_balancer_service.protocol == "http"
|
||||||
- load_balancer_service.hcloud_load_balancer_service.listen_port == 80
|
- load_balancer_service.hcloud_load_balancer_service.listen_port == 80
|
||||||
- load_balancer_service.hcloud_load_balancer_service.destination_port == 80
|
- load_balancer_service.hcloud_load_balancer_service.destination_port == 80
|
||||||
- load_balancer_service.hcloud_load_balancer_service.proxyprotocol is sameas false
|
- load_balancer_service.hcloud_load_balancer_service.proxyprotocol is sameas false
|
||||||
|
|
||||||
- name: test create load_balancer service idempotency
|
- name: test create load_balancer service idempotency
|
||||||
hcloud_load_balancer_service:
|
hcloud_load_balancer_service:
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
- name: verify create load_balancer service idempotency
|
- name: verify create load_balancer service idempotency
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancer_service is not changed
|
- load_balancer_service is not changed
|
||||||
|
|
||||||
- name: test update load_balancer service
|
- name: test update load_balancer service
|
||||||
hcloud_load_balancer_service:
|
hcloud_load_balancer_service:
|
||||||
|
@ -78,11 +78,11 @@
|
||||||
- name: verify create load_balancer service
|
- name: verify create load_balancer service
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancer_service is changed
|
- load_balancer_service is changed
|
||||||
- load_balancer_service.hcloud_load_balancer_service.protocol == "tcp"
|
- load_balancer_service.hcloud_load_balancer_service.protocol == "tcp"
|
||||||
- load_balancer_service.hcloud_load_balancer_service.listen_port == 80
|
- load_balancer_service.hcloud_load_balancer_service.listen_port == 80
|
||||||
- load_balancer_service.hcloud_load_balancer_service.destination_port == 80
|
- load_balancer_service.hcloud_load_balancer_service.destination_port == 80
|
||||||
- load_balancer_service.hcloud_load_balancer_service.proxyprotocol is sameas false
|
- load_balancer_service.hcloud_load_balancer_service.proxyprotocol is sameas false
|
||||||
|
|
||||||
- name: test absent load_balancer service
|
- name: test absent load_balancer service
|
||||||
hcloud_load_balancer_service:
|
hcloud_load_balancer_service:
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
- name: verify test absent load_balancer service
|
- name: verify test absent load_balancer service
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test create load_balancer service with http
|
- name: test create load_balancer service with http
|
||||||
hcloud_load_balancer_service:
|
hcloud_load_balancer_service:
|
||||||
|
@ -103,17 +103,17 @@
|
||||||
listen_port: 80
|
listen_port: 80
|
||||||
http:
|
http:
|
||||||
cookie_name: "Test"
|
cookie_name: "Test"
|
||||||
sticky_sessions: yes
|
sticky_sessions: true
|
||||||
state: present
|
state: present
|
||||||
register: load_balancer_service
|
register: load_balancer_service
|
||||||
- name: verify create load_balancer service
|
- name: verify create load_balancer service
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancer_service is changed
|
- load_balancer_service is changed
|
||||||
- load_balancer_service.hcloud_load_balancer_service.protocol == "http"
|
- load_balancer_service.hcloud_load_balancer_service.protocol == "http"
|
||||||
- load_balancer_service.hcloud_load_balancer_service.listen_port == 80
|
- load_balancer_service.hcloud_load_balancer_service.listen_port == 80
|
||||||
- load_balancer_service.hcloud_load_balancer_service.destination_port == 80
|
- load_balancer_service.hcloud_load_balancer_service.destination_port == 80
|
||||||
- load_balancer_service.hcloud_load_balancer_service.proxyprotocol is sameas false
|
- load_balancer_service.hcloud_load_balancer_service.proxyprotocol is sameas false
|
||||||
|
|
||||||
- name: cleanup load_balancer
|
- name: cleanup load_balancer
|
||||||
hcloud_load_balancer:
|
hcloud_load_balancer:
|
||||||
|
@ -123,4 +123,4 @@
|
||||||
- name: verify cleanup load_balancer
|
- name: verify cleanup load_balancer
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
|
@ -59,11 +59,11 @@
|
||||||
server: "{{hcloud_server_name}}"
|
server: "{{hcloud_server_name}}"
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test create load_balancer target with checkmode
|
- name: verify test create load_balancer target with checkmode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test create load_balancer target
|
- name: test create load_balancer target
|
||||||
hcloud_load_balancer_target:
|
hcloud_load_balancer_target:
|
||||||
|
@ -75,10 +75,10 @@
|
||||||
- name: verify create load_balancer target
|
- name: verify create load_balancer target
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancer_target is changed
|
- load_balancer_target is changed
|
||||||
- load_balancer_target.hcloud_load_balancer_target.type == "server"
|
- load_balancer_target.hcloud_load_balancer_target.type == "server"
|
||||||
- load_balancer_target.hcloud_load_balancer_target.server == hcloud_server_name
|
- load_balancer_target.hcloud_load_balancer_target.server == hcloud_server_name
|
||||||
- load_balancer_target.hcloud_load_balancer_target.load_balancer == hcloud_load_balancer_name
|
- load_balancer_target.hcloud_load_balancer_target.load_balancer == hcloud_load_balancer_name
|
||||||
|
|
||||||
- name: test create load_balancer target idempotency
|
- name: test create load_balancer target idempotency
|
||||||
hcloud_load_balancer_target:
|
hcloud_load_balancer_target:
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
- name: verify create load_balancer target idempotency
|
- name: verify create load_balancer target idempotency
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancer_target is not changed
|
- load_balancer_target is not changed
|
||||||
|
|
||||||
- name: test absent load_balancer target
|
- name: test absent load_balancer target
|
||||||
hcloud_load_balancer_target:
|
hcloud_load_balancer_target:
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
- name: verify test absent load_balancer target
|
- name: verify test absent load_balancer target
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test create label_selector target
|
- name: test create label_selector target
|
||||||
hcloud_load_balancer_target:
|
hcloud_load_balancer_target:
|
||||||
|
@ -114,10 +114,10 @@
|
||||||
- name: verify create label_selector target
|
- name: verify create label_selector target
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancer_target is changed
|
- load_balancer_target is changed
|
||||||
- load_balancer_target.hcloud_load_balancer_target.type == "label_selector"
|
- load_balancer_target.hcloud_load_balancer_target.type == "label_selector"
|
||||||
- load_balancer_target.hcloud_load_balancer_target.label_selector == "application=backend"
|
- load_balancer_target.hcloud_load_balancer_target.label_selector == "application=backend"
|
||||||
- load_balancer_target.hcloud_load_balancer_target.load_balancer == hcloud_load_balancer_name
|
- load_balancer_target.hcloud_load_balancer_target.load_balancer == hcloud_load_balancer_name
|
||||||
|
|
||||||
- name: test create ip target
|
- name: test create ip target
|
||||||
hcloud_load_balancer_target:
|
hcloud_load_balancer_target:
|
||||||
|
@ -129,10 +129,10 @@
|
||||||
- name: verify create ip target
|
- name: verify create ip target
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancer_target is changed
|
- load_balancer_target is changed
|
||||||
- load_balancer_target.hcloud_load_balancer_target.type == "ip"
|
- load_balancer_target.hcloud_load_balancer_target.type == "ip"
|
||||||
- load_balancer_target.hcloud_load_balancer_target.ip == hcloud_testing_ip
|
- load_balancer_target.hcloud_load_balancer_target.ip == hcloud_testing_ip
|
||||||
- load_balancer_target.hcloud_load_balancer_target.load_balancer == hcloud_load_balancer_name
|
- load_balancer_target.hcloud_load_balancer_target.load_balancer == hcloud_load_balancer_name
|
||||||
|
|
||||||
- name: cleanup load_balancer
|
- name: cleanup load_balancer
|
||||||
hcloud_load_balancer:
|
hcloud_load_balancer:
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud Load Balancer type infos in check mode
|
- name: test gather hcloud Load Balancer type infos in check mode
|
||||||
hcloud_load_balancer_type_info:
|
hcloud_load_balancer_type_info:
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: hcloud_load_balancer_types
|
register: hcloud_load_balancer_types
|
||||||
|
|
||||||
- name: verify test gather hcloud Load Balancer type infos in check mode
|
- name: verify test gather hcloud Load Balancer type infos in check mode
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud location infos in check mode
|
- name: test gather hcloud location infos in check mode
|
||||||
hcloud_location_info:
|
hcloud_location_info:
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: hcloud_location
|
register: hcloud_location
|
||||||
|
|
||||||
- name: verify test gather hcloud location infos in check mode
|
- name: verify test gather hcloud location infos in check mode
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud location infos with wrong name
|
- name: test gather hcloud location infos with wrong name
|
||||||
hcloud_location_info:
|
hcloud_location_info:
|
||||||
name: "{{hcloud_location_name}}1"
|
name: "{{hcloud_location_name}}1"
|
||||||
register: hcloud_location
|
register: hcloud_location
|
||||||
- name: verify test gather hcloud location with wrong name
|
- name: verify test gather hcloud location with wrong name
|
||||||
assert:
|
assert:
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud location infos with wrong id
|
- name: test gather hcloud location infos with wrong id
|
||||||
hcloud_location_info:
|
hcloud_location_info:
|
||||||
name: "4711"
|
name: "4711"
|
||||||
register: hcloud_location
|
register: hcloud_location
|
||||||
- name: verify test gather hcloud location with wrong id
|
- name: verify test gather hcloud location with wrong id
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
- name: verify setup
|
- name: verify setup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
- name: test missing ip_range parameter on create Network
|
- name: test missing ip_range parameter on create Network
|
||||||
hcloud_network:
|
hcloud_network:
|
||||||
name: "{{hcloud_network_name}}"
|
name: "{{hcloud_network_name}}"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail missing ip_range parameter on create Network result
|
- name: verify fail missing ip_range parameter on create Network result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
name: "{{hcloud_network_name}}"
|
name: "{{hcloud_network_name}}"
|
||||||
ip_range: "10.0.0.0/16"
|
ip_range: "10.0.0.0/16"
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify create Network with check mode result
|
- name: verify create Network with check mode result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
hcloud_network:
|
hcloud_network:
|
||||||
name: "{{hcloud_network_name}}"
|
name: "{{hcloud_network_name}}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify delete Network
|
- name: verify delete Network
|
||||||
assert:
|
assert:
|
||||||
|
@ -168,7 +168,6 @@
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
|
|
||||||
- name: test create Network with delete protection
|
- name: test create Network with delete protection
|
||||||
hcloud_network:
|
hcloud_network:
|
||||||
name: "{{hcloud_network_name}}"
|
name: "{{hcloud_network_name}}"
|
||||||
|
@ -185,7 +184,7 @@
|
||||||
hcloud_network:
|
hcloud_network:
|
||||||
name: "{{hcloud_network_name}}"
|
name: "{{hcloud_network_name}}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify delete Network
|
- name: verify delete Network
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
|
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: setup ensure network is absent
|
- name: setup ensure network is absent
|
||||||
hcloud_network:
|
hcloud_network:
|
||||||
name: "{{ hcloud_network_name }}"
|
name: "{{ hcloud_network_name }}"
|
||||||
|
@ -47,14 +46,13 @@
|
||||||
|
|
||||||
- name: test gather hcloud network info in check mode
|
- name: test gather hcloud network info in check mode
|
||||||
hcloud_network_info:
|
hcloud_network_info:
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: hcloud_network
|
register: hcloud_network
|
||||||
- name: verify test gather hcloud network info in check mode
|
- name: verify test gather hcloud network info in check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- hcloud_network.hcloud_network_info | selectattr('name','equalto','{{ hcloud_network_name }}') | list | count >= 1
|
- hcloud_network.hcloud_network_info | selectattr('name','equalto','{{ hcloud_network_name }}') | list | count >= 1
|
||||||
|
|
||||||
|
|
||||||
- name: test gather hcloud network info with correct label selector
|
- name: test gather hcloud network info with correct label selector
|
||||||
hcloud_network_info:
|
hcloud_network_info:
|
||||||
label_selector: "key=value"
|
label_selector: "key=value"
|
||||||
|
@ -86,7 +84,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud network info with wrong name
|
- name: test gather hcloud network info with wrong name
|
||||||
hcloud_network_info:
|
hcloud_network_info:
|
||||||
name: "{{hcloud_network_name}}1"
|
name: "{{hcloud_network_name}}1"
|
||||||
register: hcloud_network
|
register: hcloud_network
|
||||||
- name: verify test gather hcloud network with wrong name
|
- name: verify test gather hcloud network with wrong name
|
||||||
assert:
|
assert:
|
||||||
|
@ -104,7 +102,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud network info with wrong id
|
- name: test gather hcloud network info with wrong id
|
||||||
hcloud_network_info:
|
hcloud_network_info:
|
||||||
name: "4711"
|
name: "4711"
|
||||||
register: hcloud_network
|
register: hcloud_network
|
||||||
- name: verify test gather hcloud network with wrong id
|
- name: verify test gather hcloud network with wrong id
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
- name: test missing required parameters on create placement group
|
- name: test missing required parameters on create placement group
|
||||||
hcloud_placement_group:
|
hcloud_placement_group:
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters on create placement group
|
- name: verify fail test missing required parameters on create placement group
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
name: "{{ hcloud_placement_group_name }}"
|
name: "{{ hcloud_placement_group_name }}"
|
||||||
type: spread
|
type: spread
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: test create placement group with check mode
|
- name: test create placement group with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
id: "{{ placement_group.hcloud_placement_group.id }}"
|
id: "{{ placement_group.hcloud_placement_group.id }}"
|
||||||
name: "changed-{{ hcloud_placement_group_name }}"
|
name: "changed-{{ hcloud_placement_group_name }}"
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify update placement group with check mode
|
- name: verify update placement group with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
type: ipv4
|
type: ipv4
|
||||||
datacenter: "fsn1-dc14"
|
datacenter: "fsn1-dc14"
|
||||||
register: primaryIP
|
register: primaryIP
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test create Primary IP with check mode
|
- name: verify test create Primary IP with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
name: "{{ hcloud_primary_ip_name }}"
|
name: "{{ hcloud_primary_ip_name }}"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify test delete primary ip
|
- name: verify test delete primary ip
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
name: "{{ hcloud_primary_ip_name }}"
|
name: "{{ hcloud_primary_ip_name }}"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify test delete primary ip
|
- name: verify test delete primary ip
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
- name: verify setup
|
- name: verify setup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- setup is success
|
- setup is success
|
||||||
|
|
||||||
- name: setup Floating IP
|
- name: setup Floating IP
|
||||||
hcloud_floating_ip:
|
hcloud_floating_ip:
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
- name: verify setup
|
- name: verify setup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- load_balancer is success
|
- load_balancer is success
|
||||||
|
|
||||||
- name: setup Primary IP
|
- name: setup Primary IP
|
||||||
hcloud_primary_ip:
|
hcloud_primary_ip:
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
hcloud_rdns:
|
hcloud_rdns:
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters
|
- name: verify fail test missing required parameters
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
ip_address: "127.0.0.1"
|
ip_address: "127.0.0.1"
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail on not existing resou
|
- name: verify fail on not existing resou
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -81,10 +81,10 @@
|
||||||
- name: verify create rdns
|
- name: verify create rdns
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- rdns is changed
|
- rdns is changed
|
||||||
- rdns.hcloud_rdns.server == "{{ hcloud_server_name }}"
|
- rdns.hcloud_rdns.server == "{{ hcloud_server_name }}"
|
||||||
- rdns.hcloud_rdns.ip_address == "{{ setup.hcloud_server.ipv6 | ansible.netcommon.ipaddr('next_usable') }}"
|
- rdns.hcloud_rdns.ip_address == "{{ setup.hcloud_server.ipv6 | ansible.netcommon.ipaddr('next_usable') }}"
|
||||||
- rdns.hcloud_rdns.dns_ptr == "example.com"
|
- rdns.hcloud_rdns.dns_ptr == "example.com"
|
||||||
|
|
||||||
- name: test create rdns idempotency
|
- name: test create rdns idempotency
|
||||||
hcloud_rdns:
|
hcloud_rdns:
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
- name: verify create rdns idempotency
|
- name: verify create rdns idempotency
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
- name: test absent rdns
|
- name: test absent rdns
|
||||||
hcloud_rdns:
|
hcloud_rdns:
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
- name: verify test absent rdns
|
- name: verify test absent rdns
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test update rdns
|
- name: test update rdns
|
||||||
hcloud_rdns:
|
hcloud_rdns:
|
||||||
|
@ -119,10 +119,10 @@
|
||||||
- name: verify update rdns
|
- name: verify update rdns
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- rdns is changed
|
- rdns is changed
|
||||||
- rdns.hcloud_rdns.server == "{{ hcloud_server_name }}"
|
- rdns.hcloud_rdns.server == "{{ hcloud_server_name }}"
|
||||||
- rdns.hcloud_rdns.ip_address == "{{ setup.hcloud_server.ipv4_address }}"
|
- rdns.hcloud_rdns.ip_address == "{{ setup.hcloud_server.ipv4_address }}"
|
||||||
- rdns.hcloud_rdns.dns_ptr == "example.com"
|
- rdns.hcloud_rdns.dns_ptr == "example.com"
|
||||||
|
|
||||||
- name: test reset rdns
|
- name: test reset rdns
|
||||||
hcloud_rdns:
|
hcloud_rdns:
|
||||||
|
@ -133,10 +133,10 @@
|
||||||
- name: verify reset rdns
|
- name: verify reset rdns
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- rdns is changed
|
- rdns is changed
|
||||||
- rdns.hcloud_rdns.server == "{{ hcloud_server_name }}"
|
- rdns.hcloud_rdns.server == "{{ hcloud_server_name }}"
|
||||||
- rdns.hcloud_rdns.ip_address == "{{ setup.hcloud_server.ipv4_address }}"
|
- rdns.hcloud_rdns.ip_address == "{{ setup.hcloud_server.ipv4_address }}"
|
||||||
- rdns.hcloud_rdns.dns_ptr != "example.com"
|
- rdns.hcloud_rdns.dns_ptr != "example.com"
|
||||||
|
|
||||||
- name: test create rdns with floating IP
|
- name: test create rdns with floating IP
|
||||||
hcloud_rdns:
|
hcloud_rdns:
|
||||||
|
@ -148,10 +148,10 @@
|
||||||
- name: verify create rdns
|
- name: verify create rdns
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- rdns is changed
|
- rdns is changed
|
||||||
- rdns.hcloud_rdns.floating_ip == "{{ hcloud_floating_ip_name }}"
|
- rdns.hcloud_rdns.floating_ip == "{{ hcloud_floating_ip_name }}"
|
||||||
- rdns.hcloud_rdns.ip_address == "{{ floatingIP.hcloud_floating_ip.ip}}"
|
- rdns.hcloud_rdns.ip_address == "{{ floatingIP.hcloud_floating_ip.ip}}"
|
||||||
- rdns.hcloud_rdns.dns_ptr == "example.com"
|
- rdns.hcloud_rdns.dns_ptr == "example.com"
|
||||||
|
|
||||||
- name: test create rdns with primary IP
|
- name: test create rdns with primary IP
|
||||||
hcloud_rdns:
|
hcloud_rdns:
|
||||||
|
@ -163,10 +163,10 @@
|
||||||
- name: verify create rdns
|
- name: verify create rdns
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- rdns is changed
|
- rdns is changed
|
||||||
- rdns.hcloud_rdns.primary_ip == "{{ hcloud_primary_ip_name }}"
|
- rdns.hcloud_rdns.primary_ip == "{{ hcloud_primary_ip_name }}"
|
||||||
- rdns.hcloud_rdns.ip_address == "{{ primaryIP.hcloud_primary_ip.ip}}"
|
- rdns.hcloud_rdns.ip_address == "{{ primaryIP.hcloud_primary_ip.ip}}"
|
||||||
- rdns.hcloud_rdns.dns_ptr == "example.com"
|
- rdns.hcloud_rdns.dns_ptr == "example.com"
|
||||||
|
|
||||||
- name: test create rdns with load balancer
|
- name: test create rdns with load balancer
|
||||||
hcloud_rdns:
|
hcloud_rdns:
|
||||||
|
@ -178,10 +178,10 @@
|
||||||
- name: verify create rdns with load balancer
|
- name: verify create rdns with load balancer
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- rdns is changed
|
- rdns is changed
|
||||||
- rdns.hcloud_rdns.load_balancer == "{{ hcloud_load_balancer_name }}"
|
- rdns.hcloud_rdns.load_balancer == "{{ hcloud_load_balancer_name }}"
|
||||||
- rdns.hcloud_rdns.ip_address == "{{ load_balancer.hcloud_load_balancer.ipv4_address }}"
|
- rdns.hcloud_rdns.ip_address == "{{ load_balancer.hcloud_load_balancer.ipv4_address }}"
|
||||||
- rdns.hcloud_rdns.dns_ptr == "example.com"
|
- rdns.hcloud_rdns.dns_ptr == "example.com"
|
||||||
|
|
||||||
- name: cleanup
|
- name: cleanup
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
|
|
|
@ -10,13 +10,13 @@
|
||||||
- name: verify setup
|
- name: verify setup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- network is success
|
- network is success
|
||||||
|
|
||||||
- name: test missing required parameters on create route
|
- name: test missing required parameters on create route
|
||||||
hcloud_route:
|
hcloud_route:
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters on create route
|
- name: verify fail test missing required parameters on create route
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -30,11 +30,11 @@
|
||||||
gateway: "10.0.1.1"
|
gateway: "10.0.1.1"
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test create route with checkmode
|
- name: verify test create route with checkmode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test create route
|
- name: test create route
|
||||||
hcloud_route:
|
hcloud_route:
|
||||||
|
@ -46,10 +46,10 @@
|
||||||
- name: verify create route
|
- name: verify create route
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- route is changed
|
- route is changed
|
||||||
- route.hcloud_route.network == "{{ hcloud_network_name }}"
|
- route.hcloud_route.network == "{{ hcloud_network_name }}"
|
||||||
- route.hcloud_route.destination == "10.100.1.0/24"
|
- route.hcloud_route.destination == "10.100.1.0/24"
|
||||||
- route.hcloud_route.gateway == "10.0.1.1"
|
- route.hcloud_route.gateway == "10.0.1.1"
|
||||||
|
|
||||||
- name: test create route idempotency
|
- name: test create route idempotency
|
||||||
hcloud_route:
|
hcloud_route:
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
- name: verify create route idempotency
|
- name: verify create route idempotency
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
- name: test fail create route with wrong gateway
|
- name: test fail create route with wrong gateway
|
||||||
hcloud_route:
|
hcloud_route:
|
||||||
|
@ -70,11 +70,11 @@
|
||||||
gateway: "10.0.1.2"
|
gateway: "10.0.1.2"
|
||||||
state: present
|
state: present
|
||||||
register: route
|
register: route
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verfiy fail create route with wrong gateway
|
- name: verfiy fail create route with wrong gateway
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- route is failed
|
- route is failed
|
||||||
|
|
||||||
- name: test absent route
|
- name: test absent route
|
||||||
hcloud_route:
|
hcloud_route:
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
- name: verify test absent route
|
- name: verify test absent route
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: cleanup
|
- name: cleanup
|
||||||
hcloud_network:
|
hcloud_network:
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
image: ubuntu-22.04
|
image: ubuntu-22.04
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: test create server server
|
- name: test create server server
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
name: "{{ hcloud_server_name }}"
|
name: "{{ hcloud_server_name }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify stop server with check mode
|
- name: verify stop server with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -309,7 +309,7 @@
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
name: "{{hcloud_server_name}}"
|
name: "{{hcloud_server_name}}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify delete server fails if it is protected
|
- name: verify delete server fails if it is protected
|
||||||
assert:
|
assert:
|
||||||
|
@ -322,7 +322,7 @@
|
||||||
name: "{{hcloud_server_name}}"
|
name: "{{hcloud_server_name}}"
|
||||||
image: ubuntu-22.04
|
image: ubuntu-22.04
|
||||||
state: rebuild
|
state: rebuild
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify rebuild server fails if it is protected
|
- name: verify rebuild server fails if it is protected
|
||||||
assert:
|
assert:
|
||||||
|
@ -353,7 +353,7 @@
|
||||||
- name: verify absent server
|
- name: verify absent server
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
- name: test create server with ssh key
|
- name: test create server with ssh key
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
|
@ -373,7 +373,6 @@
|
||||||
- main_server.hcloud_server.status == "running"
|
- main_server.hcloud_server.status == "running"
|
||||||
- main_server.root_password != ""
|
- main_server.root_password != ""
|
||||||
|
|
||||||
|
|
||||||
- name: test activate rescue mode with check_mode
|
- name: test activate rescue mode with check_mode
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
name: "{{ hcloud_server_name }}"
|
name: "{{ hcloud_server_name }}"
|
||||||
|
@ -435,7 +434,7 @@
|
||||||
- name: verify absent server
|
- name: verify absent server
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
- name: test create server with rescue_mode
|
- name: test create server with rescue_mode
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
|
@ -457,7 +456,6 @@
|
||||||
- main_server.root_password != ""
|
- main_server.root_password != ""
|
||||||
- main_server.hcloud_server.rescue_enabled is sameas true
|
- main_server.hcloud_server.rescue_enabled is sameas true
|
||||||
|
|
||||||
|
|
||||||
- name: absent server
|
- name: absent server
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
name: "{{ hcloud_server_name }}"
|
name: "{{ hcloud_server_name }}"
|
||||||
|
@ -466,7 +464,7 @@
|
||||||
- name: verify absent server
|
- name: verify absent server
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
- name: test create server with labels
|
- name: test create server with labels
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
name: "{{ hcloud_server_name}}"
|
name: "{{ hcloud_server_name}}"
|
||||||
|
@ -530,7 +528,7 @@
|
||||||
- name: verify cleanup
|
- name: verify cleanup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
- name: test create server with enabled backups
|
- name: test create server with enabled backups
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
|
@ -556,7 +554,7 @@
|
||||||
- name: verify cleanup
|
- name: verify cleanup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
- name: test create server with protection
|
- name: test create server with protection
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
|
@ -581,7 +579,7 @@
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
name: "{{hcloud_server_name}}"
|
name: "{{hcloud_server_name}}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify delete server fails if it is protected
|
- name: verify delete server fails if it is protected
|
||||||
assert:
|
assert:
|
||||||
|
@ -612,4 +610,4 @@
|
||||||
- name: verify cleanup
|
- name: verify cleanup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
firewalls:
|
firewalls:
|
||||||
- not-existing
|
- not-existing
|
||||||
state: present
|
state: present
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify add not existing firewall should fail
|
- name: verify add not existing firewall should fail
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
image: "ubuntu-22.04"
|
image: "ubuntu-22.04"
|
||||||
ipv4: "{{secondPrimaryIPv4.hcloud_primary_ip.id}}"
|
ipv4: "{{secondPrimaryIPv4.hcloud_primary_ip.id}}"
|
||||||
ipv6: ""
|
ipv6: ""
|
||||||
enable_ipv6: no
|
enable_ipv6: false
|
||||||
ssh_keys:
|
ssh_keys:
|
||||||
- ci@ansible.hetzner.cloud
|
- ci@ansible.hetzner.cloud
|
||||||
state: stopped
|
state: stopped
|
||||||
|
|
|
@ -66,8 +66,8 @@
|
||||||
server_type: cpx11
|
server_type: cpx11
|
||||||
datacenter: "fsn1-dc14"
|
datacenter: "fsn1-dc14"
|
||||||
image: "ubuntu-22.04"
|
image: "ubuntu-22.04"
|
||||||
enable_ipv4: no
|
enable_ipv4: false
|
||||||
enable_ipv6: no
|
enable_ipv6: false
|
||||||
private_networks:
|
private_networks:
|
||||||
- "{{ primaryNetwork.hcloud_network.name }}"
|
- "{{ primaryNetwork.hcloud_network.name }}"
|
||||||
ssh_keys:
|
ssh_keys:
|
||||||
|
@ -85,8 +85,8 @@
|
||||||
server_type: cpx11
|
server_type: cpx11
|
||||||
datacenter: "fsn1-dc14"
|
datacenter: "fsn1-dc14"
|
||||||
image: "ubuntu-22.04"
|
image: "ubuntu-22.04"
|
||||||
enable_ipv4: no
|
enable_ipv4: false
|
||||||
enable_ipv6: no
|
enable_ipv6: false
|
||||||
private_networks:
|
private_networks:
|
||||||
- "{{ primaryNetwork.hcloud_network.name }}"
|
- "{{ primaryNetwork.hcloud_network.name }}"
|
||||||
- "{{ secondaryNetwork.hcloud_network.id }}"
|
- "{{ secondaryNetwork.hcloud_network.id }}"
|
||||||
|
@ -105,8 +105,8 @@
|
||||||
server_type: cpx11
|
server_type: cpx11
|
||||||
datacenter: "fsn1-dc14"
|
datacenter: "fsn1-dc14"
|
||||||
image: "ubuntu-22.04"
|
image: "ubuntu-22.04"
|
||||||
enable_ipv4: no
|
enable_ipv4: false
|
||||||
enable_ipv6: no
|
enable_ipv6: false
|
||||||
private_networks:
|
private_networks:
|
||||||
- "{{ primaryNetwork.hcloud_network.name }}"
|
- "{{ primaryNetwork.hcloud_network.name }}"
|
||||||
- "{{ secondaryNetwork.hcloud_network.id }}"
|
- "{{ secondaryNetwork.hcloud_network.id }}"
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
- name: verify setup
|
- name: verify setup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
- name: test missing required parameters on create server
|
- name: test missing required parameters on create server
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
name: "{{ hcloud_server_name }}"
|
name: "{{ hcloud_server_name }}"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters on create server
|
- name: verify fail test missing required parameters on create server
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
image: ubuntu-22.04
|
image: ubuntu-22.04
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test create server with not existing server type
|
- name: verify fail test create server with not existing server type
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
image: my-not-existing-image-20.04
|
image: my-not-existing-image-20.04
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test create server with not existing image
|
- name: verify fail test create server with not existing image
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
|
|
@ -25,18 +25,16 @@
|
||||||
- main_server.hcloud_server.status == "running"
|
- main_server.hcloud_server.status == "running"
|
||||||
- main_server.root_password != ""
|
- main_server.root_password != ""
|
||||||
|
|
||||||
|
|
||||||
- name: test gather hcloud server infos in check mode
|
- name: test gather hcloud server infos in check mode
|
||||||
hcloud_server_info:
|
hcloud_server_info:
|
||||||
register: server
|
register: server
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: verify test gather hcloud server infos in check mode
|
- name: verify test gather hcloud server infos in check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- server.hcloud_server_info|selectattr('name','equalto','{{ hcloud_server_name }}') | list | count == 1
|
- server.hcloud_server_info|selectattr('name','equalto','{{ hcloud_server_name }}') | list | count == 1
|
||||||
|
|
||||||
|
|
||||||
- name: test gather hcloud server infos with correct label selector
|
- name: test gather hcloud server infos with correct label selector
|
||||||
hcloud_server_info:
|
hcloud_server_info:
|
||||||
label_selector: "key=value"
|
label_selector: "key=value"
|
||||||
|
@ -66,7 +64,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud server infos with wrong name
|
- name: test gather hcloud server infos with wrong name
|
||||||
hcloud_server_info:
|
hcloud_server_info:
|
||||||
name: "{{hcloud_server_name}}1"
|
name: "{{hcloud_server_name}}1"
|
||||||
register: server
|
register: server
|
||||||
- name: verify test gather hcloud server infos with wrong name
|
- name: verify test gather hcloud server infos with wrong name
|
||||||
assert:
|
assert:
|
||||||
|
@ -84,7 +82,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud server infos with wrong id
|
- name: test gather hcloud server infos with wrong id
|
||||||
hcloud_server_info:
|
hcloud_server_info:
|
||||||
name: "4711"
|
name: "4711"
|
||||||
register: server
|
register: server
|
||||||
- name: verify test gather hcloud server infos with wrong id
|
- name: verify test gather hcloud server infos with wrong id
|
||||||
assert:
|
assert:
|
||||||
|
@ -104,8 +102,8 @@
|
||||||
state: stopped
|
state: stopped
|
||||||
labels:
|
labels:
|
||||||
key: value
|
key: value
|
||||||
enable_ipv4: no
|
enable_ipv4: false
|
||||||
enable_ipv6: no
|
enable_ipv6: false
|
||||||
register: main_server
|
register: main_server
|
||||||
- name: verify create server
|
- name: verify create server
|
||||||
assert:
|
assert:
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
- name: verify setup network
|
- name: verify setup network
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- network is success
|
- network is success
|
||||||
|
|
||||||
- name: setup subnetwork
|
- name: setup subnetwork
|
||||||
hcloud_subnetwork:
|
hcloud_subnetwork:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
- name: verify subnetwork
|
- name: verify subnetwork
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- subnetwork is success
|
- subnetwork is success
|
||||||
|
|
||||||
- name: setup server
|
- name: setup server
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
hcloud_server_network:
|
hcloud_server_network:
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters on create server network
|
- name: verify fail test missing required parameters on create server network
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -55,11 +55,11 @@
|
||||||
server: "{{hcloud_server_name}}"
|
server: "{{hcloud_server_name}}"
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test create server network with checkmode
|
- name: verify test create server network with checkmode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test create server network
|
- name: test create server network
|
||||||
hcloud_server_network:
|
hcloud_server_network:
|
||||||
|
@ -70,9 +70,9 @@
|
||||||
- name: verify create server network
|
- name: verify create server network
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- serverNetwork is changed
|
- serverNetwork is changed
|
||||||
- serverNetwork.hcloud_server_network.network == hcloud_network_name
|
- serverNetwork.hcloud_server_network.network == hcloud_network_name
|
||||||
- serverNetwork.hcloud_server_network.server == hcloud_server_name
|
- serverNetwork.hcloud_server_network.server == hcloud_server_name
|
||||||
|
|
||||||
- name: test create server network idempotency
|
- name: test create server network idempotency
|
||||||
hcloud_server_network:
|
hcloud_server_network:
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
- name: verify create server network idempotency
|
- name: verify create server network idempotency
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- serverNetwork is not changed
|
- serverNetwork is not changed
|
||||||
|
|
||||||
- name: test absent server network
|
- name: test absent server network
|
||||||
hcloud_server_network:
|
hcloud_server_network:
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
- name: verify test absent server network
|
- name: verify test absent server network
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test create server network with specified ip
|
- name: test create server network with specified ip
|
||||||
hcloud_server_network:
|
hcloud_server_network:
|
||||||
|
@ -106,10 +106,10 @@
|
||||||
- name: verify create server network with specified ip
|
- name: verify create server network with specified ip
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- serverNetwork is changed
|
- serverNetwork is changed
|
||||||
- serverNetwork.hcloud_server_network.network == hcloud_network_name
|
- serverNetwork.hcloud_server_network.network == hcloud_network_name
|
||||||
- serverNetwork.hcloud_server_network.server == hcloud_server_name
|
- serverNetwork.hcloud_server_network.server == hcloud_server_name
|
||||||
- serverNetwork.hcloud_server_network.ip == "10.0.0.2"
|
- serverNetwork.hcloud_server_network.ip == "10.0.0.2"
|
||||||
|
|
||||||
- name: cleanup create server network with specified ip
|
- name: cleanup create server network with specified ip
|
||||||
hcloud_server_network:
|
hcloud_server_network:
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
- name: verify cleanup create server network with specified ip
|
- name: verify cleanup create server network with specified ip
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test create server network with alias ips
|
- name: test create server network with alias ips
|
||||||
hcloud_server_network:
|
hcloud_server_network:
|
||||||
|
@ -135,12 +135,12 @@
|
||||||
- name: verify create server network with alias ips
|
- name: verify create server network with alias ips
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- serverNetwork is changed
|
- serverNetwork is changed
|
||||||
- serverNetwork.hcloud_server_network.network == hcloud_network_name
|
- serverNetwork.hcloud_server_network.network == hcloud_network_name
|
||||||
- serverNetwork.hcloud_server_network.server == hcloud_server_name
|
- serverNetwork.hcloud_server_network.server == hcloud_server_name
|
||||||
- serverNetwork.hcloud_server_network.ip == "10.0.0.2"
|
- serverNetwork.hcloud_server_network.ip == "10.0.0.2"
|
||||||
- 'serverNetwork.hcloud_server_network.alias_ips[0] == "10.0.2.3"'
|
- 'serverNetwork.hcloud_server_network.alias_ips[0] == "10.0.2.3"'
|
||||||
- 'serverNetwork.hcloud_server_network.alias_ips[1] == "10.0.1.2"'
|
- 'serverNetwork.hcloud_server_network.alias_ips[1] == "10.0.1.2"'
|
||||||
|
|
||||||
- name: test update server network with alias ips
|
- name: test update server network with alias ips
|
||||||
hcloud_server_network:
|
hcloud_server_network:
|
||||||
|
@ -155,12 +155,12 @@
|
||||||
- name: verify create server network with alias ips
|
- name: verify create server network with alias ips
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- serverNetwork is changed
|
- serverNetwork is changed
|
||||||
- serverNetwork.hcloud_server_network.network == hcloud_network_name
|
- serverNetwork.hcloud_server_network.network == hcloud_network_name
|
||||||
- serverNetwork.hcloud_server_network.server == hcloud_server_name
|
- serverNetwork.hcloud_server_network.server == hcloud_server_name
|
||||||
- serverNetwork.hcloud_server_network.ip == "10.0.0.2"
|
- serverNetwork.hcloud_server_network.ip == "10.0.0.2"
|
||||||
- 'serverNetwork.hcloud_server_network.alias_ips[0] == "10.0.2.3"'
|
- 'serverNetwork.hcloud_server_network.alias_ips[0] == "10.0.2.3"'
|
||||||
- 'serverNetwork.hcloud_server_network.alias_ips[1] == "10.0.3.1"'
|
- 'serverNetwork.hcloud_server_network.alias_ips[1] == "10.0.3.1"'
|
||||||
|
|
||||||
- name: test update server network with alias ips idempotency
|
- name: test update server network with alias ips idempotency
|
||||||
hcloud_server_network:
|
hcloud_server_network:
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
- name: verify create server network with alias ips idempotency
|
- name: verify create server network with alias ips idempotency
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- serverNetwork is not changed
|
- serverNetwork is not changed
|
||||||
|
|
||||||
- name: cleanup create server network with alias ips
|
- name: cleanup create server network with alias ips
|
||||||
hcloud_server_network:
|
hcloud_server_network:
|
||||||
|
@ -186,7 +186,7 @@
|
||||||
- name: verify cleanup create server network with alias ips
|
- name: verify cleanup create server network with alias ips
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: cleanup server
|
- name: cleanup server
|
||||||
hcloud_server:
|
hcloud_server:
|
||||||
|
@ -196,7 +196,7 @@
|
||||||
- name: verify cleanup server
|
- name: verify cleanup server
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
- name: cleanup subnetwork
|
- name: cleanup subnetwork
|
||||||
hcloud_subnetwork:
|
hcloud_subnetwork:
|
||||||
|
@ -209,7 +209,7 @@
|
||||||
- name: verify cleanup subnetwork
|
- name: verify cleanup subnetwork
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: cleanup
|
- name: cleanup
|
||||||
hcloud_network:
|
hcloud_network:
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud server type infos in check mode
|
- name: test gather hcloud server type infos in check mode
|
||||||
hcloud_server_type_info:
|
hcloud_server_type_info:
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: hcloud_server_types
|
register: hcloud_server_types
|
||||||
|
|
||||||
- name: verify test gather hcloud server type infos in check mode
|
- name: verify test gather hcloud server type infos in check mode
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
hcloud_ssh_key:
|
hcloud_ssh_key:
|
||||||
name: "{{ hcloud_ssh_key_name }}"
|
name: "{{ hcloud_ssh_key_name }}"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters on create ssh_key
|
- name: verify fail test missing required parameters on create ssh_key
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
name: "{{ hcloud_ssh_key_name }}"
|
name: "{{ hcloud_ssh_key_name }}"
|
||||||
public_key: "{{ key_material }}"
|
public_key: "{{ key_material }}"
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: test create ssh key with check mode
|
- name: test create ssh key with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
id: "{{ sshKey.hcloud_ssh_key.id }}"
|
id: "{{ sshKey.hcloud_ssh_key.id }}"
|
||||||
name: "changed-{{ hcloud_ssh_key_name }}"
|
name: "changed-{{ hcloud_ssh_key_name }}"
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: test create ssh key with check mode
|
- name: test create ssh key with check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
name: "{{ hcloud_ssh_key_name }}othername"
|
name: "{{ hcloud_ssh_key_name }}othername"
|
||||||
public_key: "{{ hcloud_doubled_ssh_key_public_key }}"
|
public_key: "{{ hcloud_doubled_ssh_key_public_key }}"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify failed correctly
|
- name: verify failed correctly
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
|
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: setup ensure ssh key is absent
|
- name: setup ensure ssh key is absent
|
||||||
hcloud_ssh_key:
|
hcloud_ssh_key:
|
||||||
name: "{{ hcloud_ssh_key_name }}"
|
name: "{{ hcloud_ssh_key_name }}"
|
||||||
|
@ -24,20 +23,20 @@
|
||||||
- name: test gather hcloud ssh key infos in check mode
|
- name: test gather hcloud ssh key infos in check mode
|
||||||
hcloud_ssh_key_info:
|
hcloud_ssh_key_info:
|
||||||
register: hcloud_ssh_key
|
register: hcloud_ssh_key
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test gather hcloud ssh key infos in check mode
|
- name: verify test gather hcloud ssh key infos in check mode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- hcloud_ssh_key.hcloud_ssh_key_info| list | count >= 1
|
- hcloud_ssh_key.hcloud_ssh_key_info| list | count >= 1
|
||||||
|
|
||||||
- name: test gather hcloud ssh key infos
|
- name: test gather hcloud ssh key infos
|
||||||
hcloud_ssh_key_info:
|
hcloud_ssh_key_info:
|
||||||
register: hcloud_ssh_key
|
register: hcloud_ssh_key
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test gather hcloud ssh key infos
|
- name: verify test gather hcloud ssh key infos
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- hcloud_ssh_key.hcloud_ssh_key_info| list | count >= 1
|
- hcloud_ssh_key.hcloud_ssh_key_info| list | count >= 1
|
||||||
|
|
||||||
- name: test gather hcloud ssh key infos with correct label selector
|
- name: test gather hcloud ssh key infos with correct label selector
|
||||||
hcloud_ssh_key_info:
|
hcloud_ssh_key_info:
|
||||||
|
@ -65,4 +64,4 @@
|
||||||
- name: verify cleanup
|
- name: verify cleanup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
|
@ -10,14 +10,14 @@
|
||||||
- name: verify setup
|
- name: verify setup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- network is success
|
- network is success
|
||||||
|
|
||||||
- name: test missing required parameters on create route
|
- name: test missing required parameters on create route
|
||||||
hcloud_subnetwork:
|
hcloud_subnetwork:
|
||||||
network: "{{ hcloud_network_name }}"
|
network: "{{ hcloud_network_name }}"
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing required parameters on create route
|
- name: verify fail test missing required parameters on create route
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -32,11 +32,11 @@
|
||||||
network_zone: "eu-central"
|
network_zone: "eu-central"
|
||||||
state: present
|
state: present
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify test create subnetwork with checkmode
|
- name: verify test create subnetwork with checkmode
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test create subnetwork
|
- name: test create subnetwork
|
||||||
hcloud_subnetwork:
|
hcloud_subnetwork:
|
||||||
|
@ -49,11 +49,11 @@
|
||||||
- name: verify create subnetwork
|
- name: verify create subnetwork
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- subnet is changed
|
- subnet is changed
|
||||||
- subnet.hcloud_subnetwork.network == "{{ hcloud_network_name }}"
|
- subnet.hcloud_subnetwork.network == "{{ hcloud_network_name }}"
|
||||||
- subnet.hcloud_subnetwork.ip_range == "10.0.0.0/16"
|
- subnet.hcloud_subnetwork.ip_range == "10.0.0.0/16"
|
||||||
- subnet.hcloud_subnetwork.type == "cloud"
|
- subnet.hcloud_subnetwork.type == "cloud"
|
||||||
- subnet.hcloud_subnetwork.network_zone == "eu-central"
|
- subnet.hcloud_subnetwork.network_zone == "eu-central"
|
||||||
|
|
||||||
- name: test create subnetwork idempotency
|
- name: test create subnetwork idempotency
|
||||||
hcloud_subnetwork:
|
hcloud_subnetwork:
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
- name: verify create subnetwork idempotency
|
- name: verify create subnetwork idempotency
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
- name: test absent subnetwork
|
- name: test absent subnetwork
|
||||||
hcloud_subnetwork:
|
hcloud_subnetwork:
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
- name: verify test absent subnetwork
|
- name: verify test absent subnetwork
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: test vswitch subnetwork
|
- name: test vswitch subnetwork
|
||||||
hcloud_subnetwork:
|
hcloud_subnetwork:
|
||||||
|
@ -93,12 +93,12 @@
|
||||||
- name: verify test vswitch subnetwork
|
- name: verify test vswitch subnetwork
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- subnet is changed
|
- subnet is changed
|
||||||
- subnet.hcloud_subnetwork.network == "{{ hcloud_network_name }}"
|
- subnet.hcloud_subnetwork.network == "{{ hcloud_network_name }}"
|
||||||
- subnet.hcloud_subnetwork.ip_range == "10.0.0.0/16"
|
- subnet.hcloud_subnetwork.ip_range == "10.0.0.0/16"
|
||||||
- subnet.hcloud_subnetwork.type == "vswitch"
|
- subnet.hcloud_subnetwork.type == "vswitch"
|
||||||
- subnet.hcloud_subnetwork.network_zone == "eu-central"
|
- subnet.hcloud_subnetwork.network_zone == "eu-central"
|
||||||
- subnet.hcloud_subnetwork.vswitch_id == hetzner_vswitch_id
|
- subnet.hcloud_subnetwork.vswitch_id == hetzner_vswitch_id
|
||||||
|
|
||||||
- name: test absent subnetwork
|
- name: test absent subnetwork
|
||||||
hcloud_subnetwork:
|
hcloud_subnetwork:
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
- name: verify test absent subnetwork
|
- name: verify test absent subnetwork
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is changed
|
- result is changed
|
||||||
|
|
||||||
- name: cleanup
|
- name: cleanup
|
||||||
hcloud_network:
|
hcloud_network:
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
name: "{{hcloud_volume_name}}"
|
name: "{{hcloud_volume_name}}"
|
||||||
server: "{{hcloud_server_name}}"
|
server: "{{hcloud_server_name}}"
|
||||||
register: result
|
register: result
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
- name: verify fail test missing size parameter on create Volume
|
- name: verify fail test missing size parameter on create Volume
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
size: 10
|
size: 10
|
||||||
location: "fsn1"
|
location: "fsn1"
|
||||||
register: result
|
register: result
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
- name: verify create Volume with check mode result
|
- name: verify create Volume with check mode result
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
hcloud_volume:
|
hcloud_volume:
|
||||||
name: "{{hcloud_volume_name}}"
|
name: "{{hcloud_volume_name}}"
|
||||||
server: "{{hcloud_server_name}}"
|
server: "{{hcloud_server_name}}"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: volume
|
register: volume
|
||||||
- name: verify test attach Volume with checkmode
|
- name: verify test attach Volume with checkmode
|
||||||
assert:
|
assert:
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
- name: test detach Volume with checkmode
|
- name: test detach Volume with checkmode
|
||||||
hcloud_volume:
|
hcloud_volume:
|
||||||
name: "{{hcloud_volume_name}}"
|
name: "{{hcloud_volume_name}}"
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
register: volume
|
register: volume
|
||||||
- name: verify detach Volume with checkmode
|
- name: verify detach Volume with checkmode
|
||||||
assert:
|
assert:
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
hcloud_volume:
|
hcloud_volume:
|
||||||
name: "{{hcloud_volume_name}}"
|
name: "{{hcloud_volume_name}}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify delete Volume fails if it is protected
|
- name: verify delete Volume fails if it is protected
|
||||||
assert:
|
assert:
|
||||||
|
@ -231,7 +231,6 @@
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
||||||
|
|
||||||
- name: test create Volume with delete protection
|
- name: test create Volume with delete protection
|
||||||
hcloud_volume:
|
hcloud_volume:
|
||||||
name: "{{hcloud_volume_name}}"
|
name: "{{hcloud_volume_name}}"
|
||||||
|
@ -249,7 +248,7 @@
|
||||||
hcloud_volume:
|
hcloud_volume:
|
||||||
name: "{{hcloud_volume_name}}"
|
name: "{{hcloud_volume_name}}"
|
||||||
state: absent
|
state: absent
|
||||||
ignore_errors: yes
|
ignore_errors: true
|
||||||
register: result
|
register: result
|
||||||
- name: verify delete Volume fails if it is protected
|
- name: verify delete Volume fails if it is protected
|
||||||
assert:
|
assert:
|
||||||
|
@ -286,4 +285,4 @@
|
||||||
- name: verify cleanup
|
- name: verify cleanup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
- name: test gather hcloud volume infos in check mode
|
- name: test gather hcloud volume infos in check mode
|
||||||
hcloud_volume_info:
|
hcloud_volume_info:
|
||||||
register: hcloud_volume
|
register: hcloud_volume
|
||||||
check_mode: yes
|
check_mode: true
|
||||||
|
|
||||||
- name: verify test gather hcloud volume infos in check mode
|
- name: verify test gather hcloud volume infos in check mode
|
||||||
vars:
|
vars:
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud volume infos with wrong name
|
- name: test gather hcloud volume infos with wrong name
|
||||||
hcloud_volume_info:
|
hcloud_volume_info:
|
||||||
name: "{{hcloud_volume_name}}1"
|
name: "{{hcloud_volume_name}}1"
|
||||||
register: hcloud_volume
|
register: hcloud_volume
|
||||||
- name: verify test gather hcloud volume infos with wrong name
|
- name: verify test gather hcloud volume infos with wrong name
|
||||||
assert:
|
assert:
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
|
|
||||||
- name: test gather hcloud volume infos with wrong id
|
- name: test gather hcloud volume infos with wrong id
|
||||||
hcloud_volume_info:
|
hcloud_volume_info:
|
||||||
name: "4711"
|
name: "4711"
|
||||||
register: hcloud_volume
|
register: hcloud_volume
|
||||||
- name: verify test gather hcloud volume infos with wrong id
|
- name: verify test gather hcloud volume infos with wrong id
|
||||||
assert:
|
assert:
|
||||||
|
@ -98,4 +98,4 @@
|
||||||
- name: verify cleanup
|
- name: verify cleanup
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result is success
|
- result is success
|
||||||
|
|
|
@ -22,6 +22,6 @@
|
||||||
- name: set facts for future roles
|
- name: set facts for future roles
|
||||||
set_fact:
|
set_fact:
|
||||||
certificate_example_com: "{{ lookup('file',certificate_example_com.path) }}"
|
certificate_example_com: "{{ lookup('file',certificate_example_com.path) }}"
|
||||||
certificate_example_com_key: "{{ lookup('file',certificate_example_com_key.path) }}"
|
certificate_example_com_key: "{{ lookup('file',certificate_example_com_key.path) }}"
|
||||||
tags:
|
tags:
|
||||||
- prepare
|
- prepare
|
||||||
|
|
|
@ -47,9 +47,9 @@
|
||||||
|
|
||||||
- name: set facts for future roles
|
- name: set facts for future roles
|
||||||
set_fact:
|
set_fact:
|
||||||
sshkey: '{{ sshkey_file.path }}'
|
sshkey: "{{ sshkey_file.path }}"
|
||||||
key_material: "{{ lookup('file', sshkey_file.path ~ '.pub') }}"
|
key_material: "{{ lookup('file', sshkey_file.path ~ '.pub') }}"
|
||||||
another_key_material: "{{ lookup('file', another_sshkey_file.path ~ '.pub') }}"
|
another_key_material: "{{ lookup('file', another_sshkey_file.path ~ '.pub') }}"
|
||||||
fingerprint: '{{ fingerprint.stdout.split()[1] }}'
|
fingerprint: "{{ fingerprint.stdout.split()[1] }}"
|
||||||
tags:
|
tags:
|
||||||
- prepare
|
- prepare
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
integration_tests_dependencies:
|
integration_tests_dependencies:
|
||||||
- community.general
|
- community.general
|
||||||
- ansible.netcommon
|
- ansible.netcommon
|
||||||
|
|
Loading…
Reference in a new issue