Thomas Woerner
4b77b274ae
Merge pull request #645 from rjeffman/baseclass_ldapcache
...
Add support for ldap_cache and IPA API configuration.
2021-10-04 16:17:48 +02:00
Rafael Guterres Jeffman
469fef1365
Documentation: Update modules README with ldap_cache variable.
...
This patch adds documentation for ldap_cache variable to all modules.
2021-10-01 11:01:03 -03:00
Rafael Guterres Jeffman
1049a6c8c6
IPAAnsibleModule: add support for ldap_cache configuration.
...
This patch adds support for configuring IPA API connection use of
LDAP cache. It adds a new variable 'ipaapi_ldap_cache' to the base
module, and provides the variable documentation in its doc fragment.
2021-10-01 11:01:03 -03:00
Rafael Guterres Jeffman
e4d2a7b353
api_connect: Allow configuration of IPA API connection.
...
This change adds a keyword parameter to api_connect() which can be
used to configure IPA API connection, for example, controlling the
use of LDAP cache, by passing 'ldap_cache' as an argument.
Also, IPAAnsibleModule is modified to automatically filter all
parameters of the module starting with 'ipaapi_' to be used as
arguments to configure api_connect(). The argument name will have
the same name as the module parameter with 'ipaapi_' stripped off.
2021-10-01 11:01:03 -03:00
Rafael Guterres Jeffman
0fac277ec8
vault: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
2ec65e91df
user: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
5a67aa7714
sudorule: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
14c9f308d8
sudocmdgroup: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
7f80a3f140
sudocmd: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
81672bdf62
service: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
f9851f0a33
server: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
970d6c12da
selfservice: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
1ae2c1eb39
role: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
efa67303ac
pwpolicy: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
08f9259295
privilege: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
53defc9eec
permission: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
fc3f64f0f1
location: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
9bf2def20b
hostgroup: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
c497c8c4e1
host: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
952f62cd83
hbacsvcgroup: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
43d1a06b86
hbacsvc: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
7564250614
hbacrule: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
602f3a0ff3
group: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
089400dbd0
dnszone: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
6f7b514e02
dnsrecord: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
67282b1a6a
dnsforwardzone: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
f34337962d
dnsconfig: : Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
06ccc70c39
delegation: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
23e38fae27
automember: Use IPAAnsibleModule method to validate arguments.
...
Use the IPAAnsibleModule.params_fail_if_used method to validate
arguments provided by user.
2021-10-01 09:50:00 -03:00
Rafael Guterres Jeffman
3dd9855916
IPAAnsibleModule: Provide function to fail in param is invalid.
...
Almost all modules require an algorithm ta validade if the user
provided arguments for the playbook are valid for the requested
state and/or action.
This patch provides a function that tests if any of a list of
arguments were set, and fail with a standardized message, making
all modules fail in the same way.
2021-10-01 09:50:00 -03:00
Thomas Woerner
ecf5439fb2
Merge pull request #651 from rjeffman/tests_fix_ipa_context
...
Fix execution of client context tests.
2021-10-01 14:14:00 +02:00
Rafael Guterres Jeffman
16db503929
Fix execution of client context tests.
...
When running the tests that can be executed either on server or client
context, without defining 'ipa_context', the context is automatically
identified.
Currently, the tests in upstream CI run only on a server, and the
context is identified as "server" context, and in order to run the test
using a client context 'ipa_context' must be set to 'client'.
This patch fixes all the client context tests by correctly setting
ipa_context when running the client context tests in a server host.
2021-09-30 19:30:53 -03:00
Rafael Guterres Jeffman
742799f3e9
Merge pull request #647 from t-woerner/ipaserver-readme-present-doc-enhancement
...
server: Express inability to deploy a server in example doc strings
2021-09-30 09:20:43 -03:00
Thomas Woerner
b434c5f325
Merge pull request #400 from rjeffman/lint_fix_ansible_lint_issues
...
Make ansible-lint and yamllint use more strict rules.
2021-09-30 12:03:38 +02:00
Thomas Woerner
7b05c02669
Merge pull request #650 from rjeffman/setup_py_pylint
...
setup.py: Disable pylint rule import-error.
2021-09-30 11:03:44 +02:00
Rafael Guterres Jeffman
26ac5a284a
setup.py: Disable pylint rule import-error.
...
When running pylint against 'setup.py' it warns that an import is
not used. While it is not directly used, this is a fix for an issue
with older versions of Python, so this change tells pylint to ignore
the error.
2021-09-29 15:52:30 -03:00
Rafael Guterres Jeffman
a5310b0a85
pre-commit: Exclude env_*.yml files from ansible-lint.
...
As of September, 2021, Ansible-lint cannot evaluate task files which
included through `include_tasks`, as it fails syntax-check.
This change exclude evaluation of these files (`env_*`) when evaluating
files before commit (pre-commit).
2021-09-29 15:49:01 -03:00
Rafael Guterres Jeffman
279ac60ac1
Fix example playbooks task name to better represent action performed.
2021-09-29 15:49:01 -03:00
Rafael Guterres Jeffman
484c39d7c8
Fix user example playbooks that manage certificate members.
...
These playbooks manage the certificates of a user, but did not have
the proper action for it.
2021-09-29 15:49:00 -03:00
Rafael Guterres Jeffman
12338309d2
ipauser, ipahost: Enable verification for certificate tests.
...
Some tests for ipahost and ipauser modules, related to certificates
had the verification part disabled. This patch enable these
verifications.
2021-09-29 15:49:00 -03:00
Rafael Guterres Jeffman
e069395ba0
Make ansible-lint and yamllint use more strict rules.
...
This patch modifies configuration of both ansible-lint and yamllint
to check for more rules, resulting in a more strict verification.
For ansible-lint verification of errors 301, 305 and 505 are skipped,
due to false positives. For the same reason, 'experimental' rules
are skipped.
ansible-lint error 306 is skipped since the fix is to set pipefail,
which is not available in all shells (for example dash, which runs
ansible-freeipa CI).
Yamllint disabled rules (comments, and indentation) would introduce a
huge amount of small changes, and are left for future changes, it
deemed necessary.
2021-09-29 15:49:00 -03:00
Rafael Guterres Jeffman
db900ffe6a
Fix comment identation in test playbooks.
...
Comments in YAML files should be aligned to content.
2021-09-29 15:49:00 -03:00
Rafael Guterres Jeffman
2939b260fc
Fix yamllint line-length warnings.
...
This patch fixes yamllint's "line too long" (line-lenght) warnings
by ensuring all lines in YAML files have, at most, 160 characters.
If a line cannot be written as a multiline block, line-length rule
evaluation is disabled for the specific line, both on yamllint and
on ansible-lint.
2021-09-29 15:49:00 -03:00
Rafael Guterres Jeffman
9ebfd011c0
Fix yamllint colons occurrences.
2021-09-29 15:49:00 -03:00
Rafael Guterres Jeffman
1032d27d95
Fix yamllint empty-lines occurrences.
2021-09-29 15:49:00 -03:00
Rafael Guterres Jeffman
37a469d44a
Fix yamllint document-start occurrences.
2021-09-29 15:49:00 -03:00
Rafael Guterres Jeffman
884282c79b
Fix Ansible warning on using an integer where a string is expected.
2021-09-29 15:49:00 -03:00
Rafael Guterres Jeffman
afe889c2ab
Ignore ansible-lint error E505 for 'users.json' file.
2021-09-29 15:49:00 -03:00
Rafael Guterres Jeffman
3943adaa8d
Fix ansible-lint error 502 (unnamed-task) for example playbooks.
...
This patch adds 'name' to all example playbook tasks that did not
have it, fixing ansible-lint's error 'unnamed-task'.
2021-09-29 15:49:00 -03:00
Rafael Guterres Jeffman
e7d354c2d4
Fix ansible-lint E502 for test playbooks.
...
This patch adds 'name' to all test playbook tasks that did not
have it, fixing ansible-lint's error 'unnamed-task'.
2021-09-29 15:49:00 -03:00