Commit Graph

367 Commits

Author SHA1 Message Date
Thomas Woerner
813d5bbf97 ipaclient_get_otp: Remove ansible_python_interpreter handling
With the deactivation of the Python2/3 test the handling of
ansible_python_interpreter needs to be removed as the setting might
not exist and is not changed in with the Python2/3 test any more.
2019-06-12 11:06:38 +02:00
Thomas Woerner
3de056bc60 ipaclient_test: Fix Python2 decode use with Python3
This is a remain of the Python2 version and has been fixed.

Fixed: #86 (AttributeError: 'str' object has no attribute 'decode')
2019-06-12 11:00:59 +02:00
Thomas Woerner
6d328caa59 ipaserver_test: Treat host, domain and realm settings in the same was as the cli
The code for host_name, the domain_name and also the realm_name has been
adapted to the code in the command line installer. The _hostname_overridden
setting is now only true if the hostname has been changed.
v0.1.2
2019-06-07 17:59:12 +02:00
Thomas Woerner
6fe001e804 ipaserver: Only use install checks in _prepare, not also in _test
The install checks have been done temporarily in _test and finally also
in _prepare. This is not needed and also not done this way in the command
line installers.
2019-06-07 17:57:17 +02:00
Thomas Woerner
e1aa9641a4 ipaserver: Add log, debug and info to AnsibleModuleLog
This makes AnsibleModuleLog compatible to the version in ipareplica role.
2019-06-07 17:48:19 +02:00
Thomas Woerner
7d43c861bb ipaserver: Add support for pki_config_override
The addtion is not oly adding the config setting, but also fixing the
deployment without the setting as functions and methods have been changed
for pki_config_override.

There is a new setting for the ipaserver role:

ipaserver_pki_config_override
2019-06-07 17:45:16 +02:00
Thomas Woerner
df65de902d ipaserver_setup_http: Only use tasks.restore_context for old releases
tasks.restore_context is only used in old releases. The existence of
paths.CACHE_IPA_SESSIONS is used to determine if the call needs to be
done or not.
2019-06-07 17:39:41 +02:00
Thomas Woerner
46925086b7 ipaserver: Remove old section for client side deployment using command line
The section is not used since a long time any more and can therefore be
removed.
2019-06-07 17:28:29 +02:00
Thomas Woerner
9a53e71de8 ipaclient_test: Use validate_hostname with constants.MAXHOSTNAMELEN
Run validate_hostname to check for valid host name if constants.MAXHOSTNAMELEN
is defined. The call has not been used in older FreeIPA versions.
2019-06-07 17:25:12 +02:00
Thomas Woerner
c82867585b Increase minimal Ansible version to 2.8
ansible-freeipa is a new Ansible Collection introduced with Ansible 2.8 and
Ansible Galaxy 3.2.
2019-06-05 17:55:21 +02:00
Thomas Woerner
2717fc6ca4 New galaxy.yml file for Ansible 2.8 and Ansible Galaxy 3.2
Dashes in names are not allowed in Galaxy and are automatically replaced
by underscores. Therefore the name in Galaxy is ansible_freeipa.
2019-06-05 17:50:38 +02:00
Thomas Woerner
62fd4cc157 New topology managament modules
There are now two topology management modules placed in the plugins folder:

  plugins/modules/ipatopologysegment.py
  plugins/modules/ipatopologysuffix.py

Topology segments can be added, removed and reinitialized with the
ipatopologysegment module. Also it is possible to verify topology suffixes
with the ipatopologysuffix module.

A new module_utils for plugins has been added:

  plugins/module_utils/ansible_freeipa_module.py

And documentation for the modules:

  README-topology.md

New sample playbooks are available in playbooks/topology:

  playbooks/topology/add-topologysegment.yml
  playbooks/topology/delete-topologysegment.yml
  playbooks/topology/reinitialize-topologysegment.yml
  playbooks/topology/verify-topologysuffix.yml

The plugins folder can be used with the new Ansible Collections supported
by Ansible 2.8 and Ansible galaxy 3.2.
2019-06-05 17:45:39 +02:00
Thomas Woerner
c822423b14 Move role documentation into the specific role locations as README.md
This will result in a better role documentation on galaxy.
2019-06-05 16:38:12 +02:00
Thomas Woerner
9c2b995724 New playbook folder for sample playbooks
The playbooks install-client.yml, install-cluster.yml, install-replica.yml,
install-server.yml, uninstall-client.yml, uninstall-cluster.yml,
uninstall-replica.yml and uninstall-server.yml have been moved into
the playbooks folder.
2019-06-05 15:47:21 +02:00
Thomas Woerner
b51397eb89 ipa[server,replica,client]: Deactivate Python2/3 test
This test is not properly working with EL-8 nodes as the default system
python is not located in /usr/bin. Additionally Ansible 2.8 is able to
detect the default python version on the system. As the installation
base for IPA 4.5.90 where the Python 3 bindings have not been working
properly should be really small or not existing any more the deactivation
of this test should be fine.
2019-06-04 11:58:52 +02:00
Thomas Woerner
2dc2799883 ipareplica: Use result from ipareplica_test for freeipa-trust enablement
The result from ipareplica_test should be used to enable freeipa-trust
in the firewall.
2019-06-04 11:47:11 +02:00
Thomas Woerner
5057b3cfe0 ipareplica: Add support for hidden replica
The hidden replica support introduced some incompatible changes to replica
deployment. The methods find_providing_server and find_providing_serves
have been moved from ipaserver.install.service to ipaserver.masters.
Additionally the host_name argument for find_providing_server is a list
now. This breaks existing ipareplica Ansible modules ipareplica_prepare
and ipareplica_enable_ipa.
2019-05-31 18:05:02 +02:00
Thomas Woerner
5951b954be ipa[server,replica]: Enable freeipa-trust service if adtrust is enabled
The freeipa-trust service has not been added if adtrust was enabled. For
ipareplica the addition of freeipa-replication has been removed as the
used port is not used anymore since some time.

Fixes: #83 (when installing with ipaserver_setup_adtrust: true the firewalld
service freeipa-trust is not added)
2019-05-31 18:04:07 +02:00
Thomas Woerner
69b894a7e5 ipareplica: Disable automatic removal of replication agreements in uninstall
Replication agreements are not removed with the command line tools.
2019-05-31 17:47:05 +02:00
Thomas Woerner
bb591f33dd roles/ipareplica/tasks/uninstall.yml: Add changed_when for uninstall
This calms down ansible-lint in Ansible galaxy.
2019-05-31 17:44:36 +02:00
Thomas Woerner
1a3f72b1f4 roles/ipareplica/tasks/install.yml: Drop unused ipareplica_backend_disconnect 2019-05-31 17:43:06 +02:00
Thomas Woerner
ab1b4bc6ba roles/ipareplica/library/ipareplica_prepare.py: Drop double sstore and fstore
sstore and fstore have been set twice.
2019-05-31 17:36:14 +02:00
Thomas Woerner
6b4f0f62de roles/ipareplica/library/ipareplica_enable_ipa.py: Do not use textwrap 2019-05-31 17:33:54 +02:00
Thomas Woerner
dd321b2065 ipa[server,replica]: Fix wrong ansible argment types
This fixes the type warnings while deploying server and replica.
2019-05-31 17:29:59 +02:00
Thomas Woerner
9397776501 ipaclient/tasks/install.yml: Save and restore ipaadmin_password with OTP
The generated OTP password is stored into ipaadmin_password. The original
password is now saved and restored later on again.

This fixes the failure with incorrect password while installing the client
part in a replica deployment.
2019-05-31 17:22:56 +02:00
Thomas Woerner
be04079fc7 ipaclient/tasks/install.yml: Disable One-Time Password for on_master
if _on_master is set, deactivate _get_otp as OTP is not needed at all
for the client side install part on a master.
2019-05-31 17:21:26 +02:00
Thomas Woerner
5bdaa9aa6f ipaclient/action_plugins/ipaclient_get_otp: Only require gssapi for keytab
gssapi is only needed for OTP if keytab is used. The common case with
password does not require gssapi.

This change also fixes the new ansible 2.8 failure if gssapi is not
installed on the controller. Ansible 2.8 seems to also transfer and load
action plugins to the node if they are not used.
2019-05-31 17:19:05 +02:00
Thomas Woerner
1b1198a091 Merge pull request #84 from obscureorganization/better-gitignore
Ignore "*.retry" and "*.pyc" files
2019-05-31 16:40:42 +02:00
Thomas Woerner
bdf3ad4a9c Merge pull request #81 from spoore1/length_fix
ipaclient install role length typo
2019-05-31 16:39:30 +02:00
Thomas Woerner
939f10eeff Merge pull request #80 from branic/fix_empty_ipaservers
Fix errors when ipaservers variable is not set
2019-05-31 16:39:09 +02:00
Richard Bullington-McGuire
eded3b4cfd Ignore "*.retry" and "*.pyc" files
These may get left behind by runtime processes and should never get
committed to the repository.
2019-05-27 20:44:52 +00:00
Thomas Woerner
58e1f03bcb Update README.md
Fixed wrong use of ipareplica name in ipaclient inventory examples.
Added tier1 and tier2 replica handling.
2019-05-14 17:38:20 +02:00
Scott Poore
e0c85c5af4 ipaclient install role length typo
Correcting small typo for lenth to length in a check
2019-05-13 11:07:06 -05:00
Brant Evans
34ce174d55 Fix errors when ipaservers variable is not set 2019-05-08 16:08:24 -06:00
Thomas Woerner
0ddd62ea01 Comment out EL-8 for now. It is not known by ansible galaxy so far v0.1.1 2019-05-03 19:13:37 +02:00
Thomas Woerner
36afd2220e ipa[server,replica]: Calm down ansible and yaml lint in ansible-galaxy 2019-05-03 19:11:58 +02:00
Thomas Woerner
2be00c1e0f ipa[server,replica]: Remove ipaclient dependency again
The dependency is either working with galaxy or with local role collection
but not with both because the role name is for the first t_woerner.ipaclient
but for the second it needs to be ipaclient only.
2019-05-03 19:09:37 +02:00
Thomas Woerner
93f9b900c6 ipaclient: Replace empty string test with length 0 test 2019-05-03 19:07:42 +02:00
Thomas Woerner
e5be194d57 ipaclient: Fix indent in install.yml 2019-05-03 18:45:01 +02:00
Thomas Woerner
65fb75feaf ipaclient: Calm down ansible and yaml lint in ansible-galaxy 2019-05-03 18:37:22 +02:00
Thomas Woerner
d08291bec4 Remove unused ipa-krb5, ipa-sssd and ipaconf roles
These roles are not used anymore.
2019-05-03 17:45:51 +02:00
Thomas Woerner
bb9abeec8c ipa[server,replica]: Use proper dependency for ipaclient role 2019-05-03 17:42:47 +02:00
Thomas Woerner
8c77c34d5f ipa[server,replica,client]: Update galaxy info
Dependencies and platforms have been updated. Commented out lines has been
removed.
2019-05-03 17:37:32 +02:00
Thomas Woerner
12006859d9 Fix white space issues in yaml files and ansible vars 2019-05-03 17:36:52 +02:00
Thomas Woerner
de087f8e38 Merge pull request #71 from Xaenalt/master
Updated setup.cfg to include all the necessary roles
v0.1.0
2019-05-03 14:43:16 +02:00
Thomas Woerner
645d8e806c Removed ipa-krb5 from the data_files section 2019-05-03 14:42:50 +02:00
Thomas Woerner
9148dde50a ipaclient_setup_nss: Create DNS SSHFP records, update to latest FreeIPA
There have been several settings in ipaclient_setup_nss that have been
hard coded instead of using the settings from the role. This has been
fixed and the code in ipaclient_setup_nss has been updated to the latest
version of FreeIPA with compatibility changes for older FreeIPA versions.
Additionally the api is now properly configured so that the DNS SSHFP
records are now properly created if no_dns_sshfp is not enabled.
2019-04-26 13:13:43 +02:00
Thomas Woerner
c18b777141 ipaclient_setup_ntp: Fixed NTP config for FreeIPA versions without sync_time
The old name ntpconf has been still used in one place of the NTP
configuration for FreeIPA versions that do not provide the sync_time
function.

Fixes: #76 (Ansible Configure NTP Task)
2019-04-26 12:50:34 +02:00
Thomas Woerner
81916b4528 ipaclient_api: Do not use version numbers for backward compatibility checks
The use of version numbers for backward compatibility checks is not
optimal because the version number is not changed if changes are back
ported. The version dependant check has been replaced with an inspect
argspec check.
2019-04-26 11:53:33 +02:00
Thomas Woerner
7a617281d7 ipaclient_setup_sssd: Use proper setting for no_krb5_offline_passwords
options.no_krb5_offline_passwords was set using the not existing role
variable krb5_offline_passwords instead of no_krb5_offline_passwords.
2019-04-26 11:51:06 +02:00