mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-28 17:36:49 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80fbcf2f98 | ||
|
|
a722e038cc | ||
|
|
19c8d2164d | ||
|
|
d4656ffca2 | ||
|
|
b49607f12d | ||
|
|
af0ce4284f | ||
|
|
f5f862617a | ||
|
|
a1a4ba4337 |
4
.github/BOTMETA.yml
vendored
4
.github/BOTMETA.yml
vendored
@@ -88,6 +88,8 @@ files:
|
||||
maintainers: $team_linode
|
||||
labels: cloud linode
|
||||
keywords: linode dynamic inventory script
|
||||
$inventories/lxd.py:
|
||||
maintainers: conloos
|
||||
$inventories/proxmox.py:
|
||||
maintainers: $team_virt ilijamt
|
||||
$inventories/scaleway.py:
|
||||
@@ -373,6 +375,8 @@ files:
|
||||
maintainers: $team_keycloak
|
||||
$modules/identity/keycloak/keycloak_group.py:
|
||||
maintainers: adamgoossens
|
||||
$modules/identity/keycloak/keycloak_realm.py:
|
||||
maintainers: kris2kris
|
||||
$modules/identity/onepassword_info.py:
|
||||
maintainers: Rylon
|
||||
$modules/identity/opendj/opendj_backendprop.py:
|
||||
|
||||
@@ -6,6 +6,20 @@ Community General Release Notes
|
||||
|
||||
This changelog describes changes after version 2.0.0.
|
||||
|
||||
v3.0.2
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfix release for the first Ansible 4.0.0 release candidate.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- stackpath_compute inventory script - fix broken validation checks for client ID and client secret (https://github.com/ansible-collections/community.general/pull/2448).
|
||||
- zfs - certain ZFS properties, especially sizes, would lead to a task being falsely marked as "changed" even when no actual change was made (https://github.com/ansible-collections/community.general/issues/975, https://github.com/ansible-collections/community.general/pull/2454).
|
||||
|
||||
v3.0.1
|
||||
======
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ This repo contains the `community.general` Ansible Collection. The collection in
|
||||
|
||||
You can find [documentation for this collection on the Ansible docs site](https://docs.ansible.com/ansible/latest/collections/community/general/).
|
||||
|
||||
Please note that this collection does **not** support Windows targets. Only connection plugins included in this collection might support Windows targets, and will explicitly mention that in their documentation if they do so.
|
||||
|
||||
## Tested with Ansible
|
||||
|
||||
Tested with the current Ansible 2.9, ansible-base 2.10 and ansible-core 2.11 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported.
|
||||
|
||||
@@ -1010,3 +1010,17 @@ releases:
|
||||
- 2435-one_vm-fix_missing_keys.yml
|
||||
- 3.0.1.yml
|
||||
release_date: '2021-05-04'
|
||||
3.0.2:
|
||||
changes:
|
||||
bugfixes:
|
||||
- stackpath_compute inventory script - fix broken validation checks for client
|
||||
ID and client secret (https://github.com/ansible-collections/community.general/pull/2448).
|
||||
- zfs - certain ZFS properties, especially sizes, would lead to a task being
|
||||
falsely marked as "changed" even when no actual change was made (https://github.com/ansible-collections/community.general/issues/975,
|
||||
https://github.com/ansible-collections/community.general/pull/2454).
|
||||
release_summary: Bugfix release for the first Ansible 4.0.0 release candidate.
|
||||
fragments:
|
||||
- 2448-stackpath_compute-fix.yml
|
||||
- 2454-detect_zfs_changed.yml
|
||||
- 3.0.2.yml
|
||||
release_date: '2021-05-11'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace: community
|
||||
name: general
|
||||
version: 3.0.1
|
||||
version: 3.0.2
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (https://github.com/ansible)
|
||||
|
||||
@@ -102,13 +102,13 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||
raise AnsibleError("plugin doesn't match this plugin")
|
||||
try:
|
||||
client_id = config['client_id']
|
||||
if client_id != 32:
|
||||
if len(client_id) != 32:
|
||||
raise AnsibleError("client_id must be 32 characters long")
|
||||
except KeyError:
|
||||
raise AnsibleError("config missing client_id, a required option")
|
||||
try:
|
||||
client_secret = config['client_secret']
|
||||
if client_secret != 64:
|
||||
if len(client_secret) != 64:
|
||||
raise AnsibleError("client_secret must be 64 characters long")
|
||||
except KeyError:
|
||||
raise AnsibleError("config missing client_id, a required option")
|
||||
|
||||
@@ -127,6 +127,11 @@ EXAMPLES = '''
|
||||
state: present
|
||||
install_options: with-baz,enable-debug
|
||||
|
||||
- name: Install formula foo with 'brew' from cask
|
||||
community.general.homebrew:
|
||||
name: homebrew/cask/foo
|
||||
state: present
|
||||
|
||||
- name: Use ignored-pinned option while upgrading all
|
||||
community.general.homebrew:
|
||||
upgrade_all: yes
|
||||
|
||||
@@ -37,6 +37,12 @@ options:
|
||||
- A dictionary of zfs properties to be set.
|
||||
- See the zfs(8) man page for more information.
|
||||
type: dict
|
||||
notes:
|
||||
- C(check_mode) is supported, but in certain situations it may report a task
|
||||
as changed that will not be reported as changed when C(check_mode) is disabled.
|
||||
For example, this might occur when the zpool C(altroot) option is set or when
|
||||
a size is written using human-readable notation, such as C(1M) or C(1024K),
|
||||
instead of as an unqualified byte count, such as C(1048576).
|
||||
author:
|
||||
- Johan Wiren (@johanwiren)
|
||||
'''
|
||||
@@ -184,9 +190,7 @@ class Zfs(object):
|
||||
return
|
||||
cmd = [self.zfs_cmd, 'set', prop + '=' + str(value), self.name]
|
||||
(rc, out, err) = self.module.run_command(cmd)
|
||||
if rc == 0:
|
||||
self.changed = True
|
||||
else:
|
||||
if rc != 0:
|
||||
self.module.fail_json(msg=err)
|
||||
|
||||
def set_properties_if_changed(self):
|
||||
@@ -194,15 +198,25 @@ class Zfs(object):
|
||||
for prop, value in self.properties.items():
|
||||
if current_properties.get(prop, None) != value:
|
||||
self.set_property(prop, value)
|
||||
if self.module.check_mode:
|
||||
return
|
||||
updated_properties = self.get_current_properties()
|
||||
for prop in self.properties:
|
||||
value = updated_properties.get(prop, None)
|
||||
if value is None:
|
||||
self.module.fail_json(msg="zfsprop was not present after being successfully set: %s" % prop)
|
||||
if current_properties.get(prop, None) != value:
|
||||
self.changed = True
|
||||
|
||||
def get_current_properties(self):
|
||||
cmd = [self.zfs_cmd, 'get', '-H']
|
||||
cmd = [self.zfs_cmd, 'get', '-H', '-p', '-o', "property,value,source"]
|
||||
if self.enhanced_sharing:
|
||||
cmd += ['-e']
|
||||
cmd += ['all', self.name]
|
||||
rc, out, err = self.module.run_command(" ".join(cmd))
|
||||
properties = dict()
|
||||
for prop, value, source in [l.split('\t')[1:4] for l in out.splitlines()]:
|
||||
for line in out.splitlines():
|
||||
prop, value, source = line.split('\t')
|
||||
# include source '-' so that creation-only properties are not removed
|
||||
# to avoids errors when the dataset already exists and the property is not changed
|
||||
# this scenario is most likely when the same playbook is run more than once
|
||||
|
||||
Reference in New Issue
Block a user