* Allow using Xen Host and/or Xen VM names instead of their UUIDs for inventory
* xen_orchestra inventory plugin allow using vm and host names instead of UUID inventory
* Update changelog fragment with correct PR number
* Set missing inventory attributes in unit test
* Add version_added suggestion as per github comments
* Description update.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix#9538 Inventory iocage fails when DHCP is enbled.
* Add changelog fragment 9539-iocage-inventory-dhcp.yml
* Keep iocage_ip4 a string.
* Rename the variable iocage_ip4 to iocage_ip4_dict in _parse_ip4.
* Update the changelog fragment.
* Rename _parse_ip4 parameter ip4_addr to ip4.
* Fix changelog frangment present tense.
* If IP is not available set iocage_ip4='-' instead of the empty string.
* Update changelogs/fragments/9539-iocage-inventory-dhcp.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Replace to_native(), to_text(), str() with str() where possible or leave it away in f-string formatting.
* Improve formulation.
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Use more f-strings.
* Remove unicode prefix for strings.
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Clean up Proxmox API token handling by stripping whitespace and formatting the token string
* Update plugins/inventory/proxmox.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/inventory/proxmox.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/9228-fix-issue-header.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/9228-fix-issue-header.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* proxmox inventory: fix urllib3 InsecureRequestWarnings not suppressing when a token is used
* proxmox inventory: add changelog fragment
* proxmox inventory: add forgotten pr number
* Update changelog.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add VM id and VM host to opennebula inventory data
##### SUMMARY
<!--- Describe the change below, including rationale and design decisions --> To enable greater use of the inventory, add the ID of the VM, and the hostname of the host the VM is running on to the inventory output
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
<!--- Please do not forget to include a changelog fragment:
https://docs.ansible.com/ansible/devel/community/collection_development_process.html#creating-changelog-fragments
No need to include one for docs-only or test-only PR, and for new plugin/module PRs.
Read about more details in CONTRIBUTING.md.
-->
##### ISSUE TYPE
<!--- Pick one or more below and delete the rest.
'Test Pull Request' is for PRs that add/extend tests without code changes. -->
- Feature Pull Request
##### COMPONENT NAME
<!--- Write the SHORT NAME of the module, plugin, task or feature below. --> opennebula.py
##### ADDITIONAL INFORMATION
<!--- Include additional information to help people understand the change here --> <!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
<!--- Paste verbatim command output below, e.g. before and after your change -->
```paste below
"host": "foo23.host",
"id": 1234,
```
* Create 8532-expand-opennuebula-inventory-data.yml
* Update opennebula.py
* Update changelogs/fragments/8532-expand-opennuebula-inventory-data.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add check for empty records and add test
* fix attribute test
* fix attribute test
* fix attribute test
* fix attribute test
* Update plugins/inventory/opennebula.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* update as per guidance
* restore attribute checks
* fix attr
* fix indent
* PR Fixes
* add attribute check in case of empty variable
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Александр Бакановский <abakanovskii@astralinux.ru>
* Get interfaces for Proxmox LXC containers
* Add changelog
* Don't use bare except
* Update changelog from suggestion
Co-authored-by: Felix Fontein <felix@fontein.de>
* Only lookup interfaces for running containers
* Ignore not implemented status
* Check that key exists in properties dict
* define ignore errors in mock
* Use not in
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update VirtualBox Group parsing to align with documentation.
Previously, we could separate the group string on the `/` char and
consider each element to be distinct, top-level groups. This change
implements the notion of nested groups and the use of the `,` char to
split multiple groups.
* Address code review comments.
Changed the implementation from a breaking change to a minor change by
introducing a new parameter to configure the behaviour. Keep the default
values to maintain the existing behaviour, and allow consumers an option
to opt-in.
* Fix line length.
The long lines were tripping CI. Reduce the length.
* Apply suggestions from code review
Update documentation to match expected conventions and correct the final rendered formatting.
Set the initial parent_group to `None` instead of `all` and rely on the parent class' inventory reconciliation logic to ensure consistent behaviour across different inventory plugins.
Co-authored-by: Felix Fontein <felix@fontein.de>
* Reword module arg description to avoid issues with CI.
One of the lines ended with a colon character which made the CI tests
fail since it would interpret it as a YAML key. Reworded the description
altogether to avoid that issue.
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix OpenNebula inventory crash when NIC does not have IP
Match IPv6 behaviour.
When a NIC does not have an IP:
File "ansible/inventory/manager.py", line 292, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File "ansible-cm/plugins/inventory/opennebula.py", line 263, in parse
self._populate()
File "ansible-cm/plugins/inventory/opennebula.py", line 226, in _populate
servers = self._retrieve_servers(filter_by_label)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "ansible-cm/plugins/inventory/opennebula.py", line 210, in _retrieve_servers
server['v4_first_ip'] = self._get_vm_ipv4(vm)
^^^^^^^^^^^^^^^^^^^^^
File "ansible-cm/plugins/inventory/opennebula.py", line 154, in _get_vm_ipv4
return net['IP']
* Update to call to match IPv6 and add changelog fragment
* Update changelog fragment.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add templating support to Icinga2 Inventory
* Added CHANGELOG fragment
* Linting after CI failure
* Update changelogs/fragments/7996-Add templating support to Icinga2 Inventory.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Error in variables'name
---------
Co-authored-by: Gianluca Salvo <gianluca.salvo@gruppomol.it>
Co-authored-by: Felix Fontein <felix@fontein.de>
* plugins/connection/lxd: rename container to instance
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/inventory/lxd: rename container to instance
It seems that a previous search and replace was done but it
missed those `containe_name` due to missing `r` in `container`.
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
---------
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* Create option to exclude proxmox nodes
* improve node exclusion by only remove the top level group
* add fragment
* Update changelogs/fragments/7437-proxmox-inventory-add-exclude-nodes.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/inventory/proxmox.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Rework node exclusion
* Update fragement PR number
* include release version in option
Co-authored-by: Felix Fontein <felix@fontein.de>
* Clarify description
* Update unit test
* Fix typos in unit test
* Fix additonal typos in test
* Fix CI
* Fixing yet another whitespace pep error
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix more typos in plugins/.
* Fix typos in tests/unit/.
* Fix typos in tests/integration/.
* Fix more typos.
Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
---------
Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
* plugins/module_utils/lxd: add server_cert_file and server_check_hostname params to LXDClient class
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/inventory/lxd: add server_cert and server_check_hostname options
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* Add changelog fragment
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
---------
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/inventory/lxd: update links to doc
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/modules/lxd_container: update links to doc
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/modules/lxd_profile: update links to doc
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* plugins/modules/lxd_project: update links to doc
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
---------
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
* Added composite var support for proxmox inventory plugin
* Composite variables support for Proxmox nodes in dynamic inventory plugin
Fixes#6640
* Composite variables support for Proxmox nodes in dynamic inventory plugin
Fixes#6640
* Added composite var support for proxmox inventory plugin
* Added composite var support for proxmox inventory plugin
* Update changelogs/fragments/6640-proxmox-composite-variables-support.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* plugins/inventory/cobbler: Add option to use system name for inventory hostname (#6492)
* plugins/inventory/cobbler: Add warning for systems with empty profiles
* Added call method to select proper response from xo server
* Added changelog fragment
* Removed excess blank lines
* Moved period in changelog fragment
* Made suggested changes
* Remove f-strings for Python 2.7 compatibility
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Linus Kirkwood <lkirkwood@allette.com.au>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Adding support for `-p` option to specify port(s) to scan
* Adding changelog fragment file
* Corrected appending options
* Edit to doc section
* Correction in documentation type
* Fixed `:` use in doc breaking yaml
* Update changelogs/fragments/6165-nmap-port.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/inventory/nmap.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/inventory/nmap.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Adding usage example
* Adding comment to example that was missed
* Breaking line up, was too long for sanity test 160 char limit
* Still too long since spaces are counted
* Changed type to string to work for a single entry as well as comma separated values
* Update changelogs/fragments/6165-nmap-port.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/inventory/nmap.py
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Suppress urllib3 InsecureRequestWarnings when validate_certs option is false
Suppress urllib3 InsecureRequestWarnings when `validate_certs` option is false.
It's clear that the user would know the possible risk when he or she chose to turn off the option, so the warning message could be ignored and make the output clean.
* Create 5915-suppress-urllib3-insecure-request-warnings.yml
* Update changelogs/fragments/5915-suppress-urllib3-insecure-request-warnings.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove extra whitespaces
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Provide project field for LXD inventory plugin
if field `project` exists in `lxd.yml`, the instances are searched in the
given LXD project. if project field is not defined the default project
named `default` will be used.
Signed-off-by: omani <3346207+omani@users.noreply.github.com>
* Update plugins/inventory/lxd.py
Signed-off-by: omani <3346207+omani@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>