* Proxmox inventory plugin - Initial implementation of filters
* This is an attempt at implementing something that would satisfy
issue #3553
* A rather massive code rewrite was needed as adding the host to the
inventory, setting its variables and adding it to various groups
used to be done as soon as the information became available. This is
not possible when it is not known whether the host should be added
to the inventory before all data has been gathered.
* The code for both LXC containers and Qemu VMs was refactored into a
single loop.
* Helper functions to generate group and fact names were added.
* Proxmox inventory plugin - Warnings for filter errors
* When an error occurs while compositing a filter's value and strict
mode is disabled, display a warning.
* Proxmox inventory plugin - Fixed pool groups building
* Hosts that were excluded by the host filters were still being added
to pool groups, causing errors.
* Proxmox inventory plugin - Refactoring
* Split off the VM/container handling code from the
`_populate()` method
* Split off pool group attribution from the `_populate()` method
* Proxmox inventory filters - Changelog fragment
* proxmox inventory - Simplify _can_add_host() method
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Implement change detection for update_cache=true. Add cache_updated return value.
* ...
* Make sure pacman --sync --list is called only as often as necessary.
* Fix linode inventory filtering
There was a regression introduced in the addition of caching. The
`_consume_options` method was added and provided the `config_data`
dictionary. This `pop`s every entry, resulting in an empty `config_data`
dict, which was then reused and expected to be populated.
After reviewing, `_consume_data` doesn't need to be called. Also, once
the ``_read_config_data` method has been called, we no longer need the
config_data dict, and can instead use the `get_option` method throughout.
Once those were removed, the filtering function seemed a bit odd, since
we were no longer using the file. I used that opportunity to move the
filter calls into the populate function directly.
* Remove tests that target removed methods
This removes tests that targeted some custom methods on configuration
file handling. These are no longer necessary since they are now handled
by the BaseInventoryPlugin `_read_config_data` method.
* Add changelog entry for linode inventory bugfix
* Revert filters back to their own method
This moves filters back into their own method, but now uses the
get_option calls to pull filter configuration items.
* npm - add '--production` support to 'npm ci' flag
* add changelog fragement for 4299
* Add backticks
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Remove nmcli modify dependency on type parameter
* Add fragment
* Add newline for lint
* Fixed linting for tests
* Fix fragment
* Move aliases to ip_conn_type function
* Remove connection_map
* Updated fragment
* Fixed fragment
Co-authored-by: Trey West <--local>
* pacman: re-adding support for URL based pkgs
* Update plugins/modules/packaging/os/pacman.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/packaging/os/pacman.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* cmd=cmd in every call to self.fail()
* pacman: integration test for mixed pkg sources
* Add more tests + fix minor bug with URL packages
Version checking for URL packages is left to pacman, so add a check
after the dry run to see if it would actually install anything.
* remove double templating
Co-authored-by: Felix Fontein <felix@fontein.de>
* keycloak: fix creating a user federation w/ idempotent id
Creating a user federation while specifying an id (that doesn't exist
yet) will fail with a 404. This commits fix this behavior.
* keycloak: fix user federation mapper duplication
This commit fixes a bug where mappers are duplicated instead of
configured when creating a user federation.
When creating a user federation, some mappers are autogenerated by
keycloak. This commit lets the keycloak_user_federation module recompute
mappers final values after the user federation is created so that the
module can try to merge them by their name.
* add missing fragment for pr #4212
* pmem: Add namespace and namespace_append options
- namespace: Configure the namespace of PMem. PMem should be configured
by appdirect/memmode, or socket option in advance.
- namespace_append: Enables to append the new namespaces.
* Add changelog fragment entry
* Update the changelog fragment
* Update changelog fragment entry
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update to use human_to_bytes
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update to fix the description of namespace_append
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update to release v4.5.0
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update to fix the typo in the description of namespace_append
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add new module: pmem
This commit introduces to pmem module to configure Intel Optane
Persistent Memory modules (PMem).
* Add botmeta
* Update plugins/modules/storage/pmem/pmem.py
* Convert to snake_case options
* Update related to xmltodict
* Update to use list instead of string
* Update to use single quote to the string
* Update plugins/modules/storage/pmem/pmem.py
* begin add private network
* scaleway_private_network , basic add and remove ok, work in progress
* scaleway_private_network : add search in next page
* scalewy_private_network add tags
* scaleway_private_network fix correct return value for register
* scaleway_privat_network change some text
* fix some sanity
* fix line too long
* fix line too long SCALEWAY_LOCATION
* some change for sanity
* fix sanity again
* add author in BOTMETA
* fix error in name in fike BOTMETA
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* add test for scaleway_private_network
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/cloud/scaleway/scaleway_private_network.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* pacman: rewrite with a cache to speed up execution
- Use a cache (or inventory) to speed up lookups of:
- installed packages and groups
- available packages and groups
- upgradable packages
- Call pacman with the list of pkgs instead of one call per package (for
installations, upgrades and removals)
- Use pacman [--sync|--upgrade] --print-format [...] to gather list of
changes. Parsing that instead of the regular output of pacman, which
is error prone and can be changed by user configuration.
This can introduce a TOCTOU problem but unless something else calls
pacman between the invocations, it shouldn't be a concern.
- Given the above, "check mode" code is within the function that would
carry out the actual operation. This should make it harder for the
check code and the "real code" to diverge.
- Support for specifying alternate package name formats is a bit more
robust. pacman is used to extract the name of the package when the
specified package is a file or a URL.
The "<repo>/<pkgname>" format is also supported.
For "state: latest" with a list of ~35 pkgs, this module is about 5
times faster than the original.
* Let fail() actually work
* all unhappy paths now end up calling fail()
* Update copyright
* Argument changes
update_cache_extra_args handled as a list like the others
moved the module setup to its own function for easier testing
update and upgrade have no defaults (None) to let required_one_of() do
its job properly
* update_cache exit path
Shift successful exit without name or upgrade under "update_cache".
It is an error if name or upgrade isn't specified and update_cache wasn't specified
either. (Caught by ansiblemodule required_one_of but still)
* Add pkgs to output on success only
Also align both format, only pkg name for now
* Multiple fixes
Move VersionTuple to top level for import from tests
Add removed pkgs to the exit json when removing packages
fixup list of upgraded pkgs reported on upgrades (was tuple of list for
no reason)
use list idiom for upgrades, like the rest
drop unused expand_package_groups function
skip empty lines when building inventory
* pacman: add tests
* python 2.x compat + pep8
* python 2.x some more
* Fix failure when pacman emits warnings
Add tests covering that failure case
* typo
* Whitespace
black failed me...
* Adjust documentation to fit implicit defaults
* fix test failures on older pythons
* remove file not intended for commit
* Test exception str with e.match
* Build inventory after cache update + adjust tests
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update plugins/modules/packaging/os/pacman.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* changelog
* bump copyright year and add my name to authors
* Update changelogs/fragments/3907-pacman-speedup.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* maintainer entry
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added new feature for ansible_user and ansible_port
* Replaced 'try' and 'except' with 'if' condition
* Replace '!=' with 'is not'
* Fixed if condition
* Implement the constructed interface
* Correction at the suggestion of felixfontein
* Added new options in unit test for icinga2 inventory
* Added blank lines in unit test for icinga2 inventory
* Added default filter in example
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fixed variable name in example
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added a changelog fragment
* Fixed changelog fragment
Co-authored-by: Felix Fontein <felix@fontein.de>
* Updated documentation options
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* linode: Allow templating token for dynamic inventory
Template the value for the access_token if it's a Jinja template.
Allows for looking up tokens from files or pulling from secrets stores like Vault.
* add Linode changelog fragment
* Fix lookup example for newer versions of Ansible
Co-authored-by: Felix Fontein <felix@fontein.de>
* Rename test case for clarity
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* nmcli: add wireguard connection type
* nmcli: fix wireguard unit tests
* nmcli: set ipv4.method to disabled if ip4 not set
Method 'auto' is not supported for WireGuard
* nmcli: add wireguard documentation
* nmcli: clean up wireguard documentation
* nmcli: add wireguard changelog fragment
* nmcli: fix wireguard documentation
* Apply suggestions from code review
Co-authored-by: Andrew Pantuso <ajpantuso@gmail.com>
Co-authored-by: Andrew Pantuso <ajpantuso@gmail.com>
* LXD 4.x compatibility (Containers and VMs)
* add changelog fragment
* update fixture
* update plugin options
* backwards compatible alias
Co-authored-by: Felix Fontein <felix@fontein.de>
* Update changelogs/fragments/3519-inventory-support-lxd-4.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* add lxd 4.0 requirement
* filter for type of virtualization added. due to duplication in the namespace, "type" is not used as the keyword but "nature".
* add type filter
Since the first version of this inventory plugin only supports containers,
a filter function was added to filter between containers and
virtual machines or both.
By default only containers are displayed, as in the first version of the plugin.
This behavior will change in the future.
* rename C(nature) to C(type)
The term "nature" does not fit into the lxd namespace.
Therefore i renamed nature to type.
* update changelog fragment
* Update plugins/inventory/lxd.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* rename typefilter to type_filter
* fix tests with type_filter
* Update plugins/inventory/lxd.py
* Update plugins/inventory/lxd.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Frank Dornheim <“dornheim@posteo.de@users.noreply.github.com”>
* rebase
* Add changelog fragment
* add suggestions
* split PR into two
* Add multiple address support but with #3768 fiexed
* rebase
* clean some merge artifacts
* update the wording
* interfaces_file: fixed unit tests and added README, added test cases for #3862
* typo fix for interfaces_file unit tests README.md
Co-authored-by: Felix Fontein <felix@fontein.de>
* typo fix for interfaces_file unit tests README.md
Co-authored-by: Felix Fontein <felix@fontein.de>
* typo fix for interfaces_file unit tests README.md
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add support for addr-gen-mode and ip6-privacy options
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* try to solve conflict
* add suggested code + fix some of its issues
* Update plugins/modules/net_tools/nmcli.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* monit - invoke run_command passing list
* added changelog fragment
* fixed unit test
* further adjustments
* fixed handling of command_args
* better handling of command_args
* change ip6 type to list of str and fix problem with setting addresses without netmask
* change ip6 type to list of str and fix problem with setting addresses without netmask
* Add changelog fragment
* add suggestions
* fix no mask using bug
* Make change independed from feature branch
* Xen orchestra inventory: Added groups, keyed_groups and compose support
* Update plugins/inventory/xen_orchestra.py
Remove extra params declaration
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* wip
* Renamed xo env variable with ANSIBLE prefix
* Suppress 3.x import and boilerplate errors
* Added shinuza as maintainer
* Do not use automatic field numbering spec
* Removed f string
* Fixed sanity checks
* wip tests
* Added working tests
* Fixed a bug when login fails
* Update plugins/inventory/xen_orchestra.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* change ip4 type to list of str
* Add several tests and change documentation
* Update changelogs/fragments/1088-nmcli_add_multiple_addresses_support.yml
Co-authored-by: Andrew Pantuso <ajpantuso@gmail.com>
Co-authored-by: Andrew Pantuso <ajpantuso@gmail.com>
* Added redis_incr module
Added redis_incr module and unit tests for the module.
Added suggested changes to increment_float, increment_int stuff
* rebased to main, version fix and unit test fix
* Renamed module,added check_mode and fixed retun value
* Update .github/BOTMETA.yml
* check_mode fix and version bump
* fix for lower Redis versions
* Update plugins/modules/database/misc/redis_data_incr.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* [callback][elastic] enrich span with http attributes
* [callback][opentelemetry] fix linting
* [callback][opentelemetry] fix UTs
* [opentelemetry][changelog] add fragment for the service map feature
* Update plugins/callback/opentelemetry.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* [opentelemetry][callback] remove comments
* [opentelemetry][callback] fix UTs
* [opentelemetry][callback] return the value
otherwise a None value returns ParseResultBytes when using urlparse(None)
* [opentelemetry][callback] fix wrong parameter order
* [opentelemetry][callback] support for no interpolated URLs
* [opentelemetry][callback] support for URLs without interpolation in the hostname
* [opentelemetry][callback] fix linting
* Update changelogs/fragments/3558-callback_opentelemetry-enrich_service_map.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
* Add elastic callback plugin
* Capture task failures
* Catch errors and add UTs
* Skip 3.5< python versions and install dependency
* fix lint
* Fix linting
* Fix linting
* Add botmeta
* Apply suggestions from code review
Co-authored-by: Felix Fontein <felix@fontein.de>
* It's not required
* As suggested in the code review OrderedDict has been added to the Python stdlib since version 2.7
* Update plugins/callback/elastic.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* [ufw] Insert or delete biased when deletion enabled - as for append or delete.
* Started creating Unit tests for Proxmox Tasks module
* Tried really hard to get the mock to work
* unit tests for the module
* Fixed symslink and permissions
* Suggested changes and more unit tests
* Fixed isFalse
* Apply suggestions from code review
* Update plugins/modules/cloud/misc/proxmox_tasks_info.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* Updated nmcli.py
Amended the routing-rules4 values as list. By this we could add the entries for "routing_rules4" in the form of a list .
* Update nmcli.py
Fixed typo in line #1701
* 3395-nmcli-needs-type.yml
routing_rules4 module argument is currently accepting only string elements. In order to accept multiple values, amended the type of routing_rules4 as list.
* nmcli: amended the routing-rules4 key values as list
routing_rules4 module argument is currently accepting only string elements. In the case of adding multiple entries to routing_rules4, we need to accept values as list.
* Added 3401-nmcli-needs-type.yml
routing_rules4 module argument is currently accepting only string elements. In the case of adding multiple entries to routing_rules4, we need to accept values as lists
* Amended type to 'minor_changes'
Amended type to 'minor_changes' from 'bug_fixes'
* routing_rules4 to a list of element str
nmcli.py - routing_rules4 to a list of element str
* Update changelogs/fragments/3401-nmcli-needs-type.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* nmcli: allow routing-rules4 key values as list
* nmcli: amended the routing-rules4 key values as list
* nmcli: amended the routing-rules4 key values as list
* nmcli: amended the routing-rules4 key values as list
* test_nmcli: amended whitespaces
* Update 3401-nmcli-needs-type.yml
Co-authored-by: Felix Fontein <felix@fontein.de>