1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

73 commits

Author SHA1 Message Date
Amin Vakil
d6f5029187
proxmox, proxmox_kvm: Deprecate hard-coded defaults (#850)
* Remove hard-coded defaults

* Remove hard-coded defaults in proxmox.py

* Add changelog

* Remove defaults in proxmox docs

* Remove more default values

* Remove defaults in doc proxmox_kvm

* Restore default=True to onboot

* Add unspecified back to format

* correct changelog format and grammar

Co-authored-by: Felix Fontein <felix@fontein.de>

* improve changelog

* Fix changelog formatting

Co-authored-by: Felix Fontein <felix@fontein.de>

* Fix changelog formatting

* Deprecate before behaviour change

* Change changelog

* Remove unnecessary ignored sanity tests, fix

* Fix

* Better mention it too often than too little :)

* Deprecate in version 4.0.0 instead of 2.0.0

* Fix changelog

* Fix

* Remove none values

* Improve documentation as suggessted by felixfontein

* fix changelog

Co-authored-by: Felix Fontein <felix@fontein.de>

* Remove default value in force in proxmox_kvm

* Add description to force in proxmox_kvm

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-30 13:15:25 +01:00
lukaszrzasik
e3e66a57ec
proxmox_kvm: allow setting format to null (None) (#1028)
* Allow setting format to null (None)

* Use string instead of None for consistency

* Add changelog

* Update changelogs/fragments/1028-proxmox-kvm-linked-clone.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/cloud/misc/proxmox_kvm.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Substitute 'unspecified' format with None

Co-authored-by: Lukasz Rzasik <lukasz.rzasik@dreamlab.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
2020-10-10 10:53:09 +02:00
Tristan Le Guern
02e80c610b
proxmox_kvm: code cleanup (#934)
* proxmox_kvm: remove redundant parameters

The functions start_vm() and stop_vm() receive four common parameters:
module, proxmox, vm and vmid.
The last too are redundant so keep only vm.

I also took the opportunity to remove extra API calls to proxmox.nodes()
by assigning its return value to a variable.

* proxmox_kvm: remove extra calls to status.current

The get_vm() function already returns an array of properties containing
the status so remove extra API calls to retrieve this information.

Example:

    [{''netin'': 177232, ''name'': ''test-instance'', ''maxcpu'': 1, ''node'': ''prx-01'', ''disk'': 0, ''template'': 0, ''uptime'': 267, ''cpu'': 0.0410680030805531, ''diskread'': 165294744, ''maxdisk'': 10737418240, ''vmid'': 42, ''status'': ''running'', ''id'': ''qemu/42'', ''maxmem'': 536870912, ''diskwrite'': 18528256, ''netout'': 2918, ''type'': ''qemu'', ''mem'': 160284950}]

* proxmox_kvm: kill VZ_TYPE global variable

It reduces readability without providing much values nowadays.

* proxmox_kvm: simplify vmid generation

Forgotten suggestion from Felix Fontein in PR#811.

* proxmox_kvm: add changelog fragment for PR#934
2020-09-23 16:39:46 +03:00
Tristan Le Guern
9a5fe4c9af
proxmox_kvm: new function wait_for_task() (#831)
Allows some factorization of redundant code in stop_vm(), start_vm(),
create_vm() and main().
This new function also waits one extra second after a successful task execution as the API can be a bit ahead of Proxmox.

Before:

    TASK [ansible-role-proxmox-instance : Ensure test-instance is created]
    changed: [localhost]

    TASK [ansible-role-proxmox-instance : Ensure test-instance is updated]
    fatal: [localhost]: FAILED! => changed=false
      msg: VM test-instance does not exist in cluster.

After:

    TASK [ansible-role-proxmox-instance : Ensure test-instance is created]
    changed: [localhost]

    TASK [ansible-role-proxmox-instance : Ensure test-instance is updated]
    changed: [localhost]

With suggestions from Felix Fontein <felix@fontein.de>.
2020-09-08 13:11:37 +02:00
Tristan Le Guern
e20eb64c6e
proxmox_kvm: allow force to be use with state=absent (#849)
In this case a running VM will be automaticaly shut down before being
removed.

With updates from Andrew Klychkov <aaklychkov@mail.ru>.
2020-09-07 22:07:40 +02:00
Tristan Le Guern
73f8338980
proxmox_kvm: fix idempotency issue with state=absent (#811)
When the `vmid` parameter is not supplied and the module can only rely on
name look-up an early failure can happen if the targeted VM doesn't exist.
In this case a task execution with the parameter `state` set to `absent`
will actually fail instead of being considered ok.

This patch introduces a deferred error-checking for non-existent VMs
by assigning the value -1 to the `vmid` parameter, allowing the actual
verification to be performed in the right code paths.
Is also help to differentiate between a non-existent `vmid` or non-existent
VM `name`.

Previously:

    TASK [ansible-role-proxmox-instance : Remove instance-test]
    changed: [localhost]
    ...
    TASK [ansible-role-proxmox-instance : Remove instance-test]
    fatal: [localhost]: FAILED! => changed=false
      msg: VM instance-test does not exist in cluster.

Now:

    TASK [ansible-role-proxmox-instance : Remove instance-test]
    ok: [localhost]
    ...
    TASK [ansible-role-proxmox-instance : Remove instance-test]
    ok: [localhost]

Update changelogs/fragments/811-proxmox-kvm-state-absent.yml

With suggestions from Felix Fontein <felix@fontein.de>.
2020-09-05 00:51:54 +02:00
Amin Vakil
d046dc34bf
Reduce ignored sanity tests in cloud/misc modules (#845)
* Reduce ignored sanity tests in cloud/misc modules

* Reduce ignored sanity tests in cloud/misc modules for proxmox_kvm

* Fix

* Remove in ignore-2.9.txt

* Fix

* Remove unneeded alias
2020-09-01 13:44:04 +02:00
AdamGoldsmith
7e6bde2ce1
Fix terraform changed status detection test (#561) (#563)
* Fix terraform changed status detection test (#561)

* Add changelog fragment

* Update changelogs/fragments/563-update-terraform-status-test.yaml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-08-21 21:44:15 +02:00
Andrew Klychkov
c055340ecb
modules: fix examples to use FQCN for builtin modules (#648)
* modules: fix examples to use FQCN for builtin modules

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2020-07-14 18:28:08 +03:00
Andrew Klychkov
41cfdda6a3
modules: fix examples to use FQCN (#644)
* modules: fix examples to use FQCN

* fix

* fix

* fix
2020-07-13 21:50:31 +02:00
Felix Fontein
097aebadb0
Fix M(). (#591)
* Fix M().

* Break long line.

* Fix the remaining M(...).

* Break long line.
2020-06-29 14:59:15 +02:00
Amin Vakil
650ae65f24
collection: Change default='no's and 'yes's to default=False and default=True (#556)
* Change default={'no','yes'} to default={False,True}

* Add changelog

* Remove changelog
2020-06-22 15:56:35 +02:00
Felix Fontein
b54ddaa28c
Clean up deprecations (#504)
* Adjust deprecation versions.

* Remove redirects that are already made in ansible/ansible's ansible_builtin_runtime.yml

* Remove modules that were moved to the google.cloud collection according to ansible/ansible's ansible_builtin_runtime.yml.

* The _info module is in google.cloud.

* The gcp doc_fragment is a copy of the one in google.cloud and is only used by one lookup. Mark as deprecated/internal.

* Remove entries of modules that no longer exist.

* Update ignore.txt.

* Try to fix test.

* Remove debug output.
2020-06-16 13:15:19 +02:00
Felix Fontein
f9589d78a8
Add version_added for all new features (#214)
* Add version_added: 1.0.0 for all new features added before pre-ansible-base.

* Add version_added: 1.0.0 for all new features.

* Next release will be 0.2.0

* Fix error.

* Remove unnecessary warnings.
2020-06-13 15:01:19 +02:00
Mohammad Yosefpor
116978abca
terraform module: Added backend_config_file and multiple variables_file (#394)
* added backend_config_file, multiple variables_file

* typo

* sanity check

* Update plugins/modules/cloud/misc/terraform.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/cloud/misc/terraform.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/cloud/misc/terraform.py

specify type

Co-authored-by: Felix Fontein <felix@fontein.de>

* change log, fixes

* polural form of option names

* typo

* another typo

* Update changelogs/fragments/394-terraform-add-config_file.yml

Added PR URL.

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-06-03 15:23:00 +03:00
Felix Fontein
a0a534508a
Un-remove wrongly removed ovirt modules and adjust deprecation to Ansible 2.14 (#353)
* Un-remove wrongly removed ovirt modules and adjust deprecation to Ansible 2.14 (regular 4 version deprecation cycle).

* Update sanity-2.10.txt

* Vendor dependencies from ovirt.ovirt as deprecated, and remove dependency on ovirt.ovirt.

* Use ovirt_facts doc_fragment, and don't add _ovirt_info doc_fragment.
2020-05-18 20:43:50 +01:00
LucasBoisserie
aadc6cd66d
Deprecated Helm module (#115)
Helm module is deprecated in favor of a new helm module from community.kubernetes.
2020-05-18 14:15:40 +05:30
Markus
cd5e3e2d85
add description and hookscript parameters to proxmox LXC container (#245)
* add description and hookscript parameters to proxmox LXC container

* fix pep8 E128

* Update plugins/modules/cloud/misc/proxmox.py

Co-Authored-By: Andrew Klychkov <aaklychkov@mail.ru>

* Update plugins/modules/cloud/misc/proxmox.py

Co-Authored-By: Andrew Klychkov <aaklychkov@mail.ru>

* add example for proxmox hookscript and description

* add changelogs fragment for PR #245

* set hookscript type

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-05-18 08:17:11 +03:00
Andrew Klychkov
328319b926
Fix Ansible documentation in part of example formatting. Part 1 (#332)
* Fix Ansible documentation in part of example formatting

* Fix
2020-05-15 13:13:45 +03:00
Andrew Klychkov
5d226f86b6
Remove ANSIBLE_METADATA (#339)
* Remove ANSIBLE_METADATA

* remove from other modules

* remove from plugins and scripts
2020-05-14 14:03:42 +01:00
Andrew Klychkov
d386506728
proxmox: fix examples formatting (#248)
* proxmox: fix examples formatting

* fix
2020-04-28 17:22:02 +03:00
Jesse Pretorius
0ffe9fa6c4
Remove libvirt/virt content (#14)
This content has been moved to:
https://github.com/ansible-collections/libvirt
2020-03-13 15:50:53 +00:00
Ansible Core Team
aebc1b03fd Initial commit 2020-03-09 09:11:07 +00:00