Commit Graph

333 Commits

Author SHA1 Message Date
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
Thomas Woerner
27a26e3a9c Update REPLICA.md 2019-04-26 11:46:23 +02:00
Thomas Woerner
65c28a3c64 Update Supported FreeIPA Versions section
The replica role is not able to work with version 4.5.
2019-04-26 11:45:28 +02:00
Sean Pryor
63b15a7871 Merge branch 'master' of https://github.com/freeipa/ansible-freeipa
Change-Id: Ice5f64f28b34efb461978aab15fe250801990729
2019-04-24 12:29:15 -04:00
Thomas Woerner
4d759b64ab Revert "ipa[server,replica,client]: Do not enforce ansible_fqdn as hostname"
This reverts commit bbaaf1f74c.
2019-04-18 17:56:14 +02:00
Sean Pryor
3145be9f80 Merge branch 'master' of https://github.com/freeipa/ansible-freeipa
Change-Id: Id2a58b8ab918ecbc77a92f8ce8dd8d0531312947
2019-04-18 09:39:43 -04:00
Sean Pryor
3f14b81bc4 Updated setup.cfg to include all the necessary roles
and remove unused roles

Change-Id: I68094fc6fcb4292508660bd8ec5d3aeafc85974f
2019-04-18 09:37:30 -04:00
Thomas Woerner
832d233380 ipareplica_setup_adtrust: Add missing settings for adtrust and module
There have been missing settings that have not been provided to
ipareplica_setup_adtrust. These are: enable_compat, rid_base and
secondary_rid_base.

The settings rid_base and secondary_rid_base are now initialized in
ipareplica_prepare and propagated in the results.

The two settings netbios_name and reset_netbios_name are placed in the
adtrust binding in the adtrust.install_check call. These are now saved
when ipareplica_prepare finishes and are written back in the fist steps of
ipareplica_setup_adtrust to make adtrust.install working.

The settings add_sids and add_agents are now initialized in
ansible_ipa_replica in the same way as in ServerMasterInstall. These
settings are fixed in the replica deployment.

Related: #73 (ipaserver_setup_adtrust fails on default smb.conf)
2019-04-18 11:52:43 +02:00
Thomas Woerner
a980aec1f8 ipaserver_setup_adtrust: Add missing settings for adtrust and module
There have been missing settings that have not been provided to
ipaserver_setup_adtrust. These are: enable_compat, rid_base and
secondary_rid_base.

The settings rid_base and secondary_rid_base are now initialized in
ipaserver_test and propagated in the results.

The two settings netbios_name and reset_netbios_name are placed in the
adtrust binding in the adtrust.install_check call. These are now saved
when ipaserver_test finishes and are written back in the fist steps of
ipaserver_setup_adtrust to make adtrust.install working.

The settings add_sids and add_agents are now initialized in
ansible_ipa_server in the same way as in ServerMasterInstall. These
settings are fixed in the server deployment.
2019-04-17 17:16:48 +02:00
Thomas Woerner
3967743a59 roles/ipareplica/defaults/main.yml: Remove unused settings
The settings ipareplica_add_sids and ipareplica_add_agents are not used
in the ipareplica role. Therefore they have been removed.
2019-04-17 17:02:12 +02:00
Thomas Woerner
482e3e944f ipaserver_test: Fix traceback caused by an Error
In case of an RuntimeError, ValueError or ScriptError the fail_json call
was done on module instead of ansible_module. module simply does not exist.
2019-04-17 17:01:30 +02:00
Thomas Woerner
0954f84572 ipa[server,replica,client]: Do not use meta end_play
Meta end_play has been used as a simple solution to end the playbook
processing in special conditions, like for example when the deployment
was already done before.

meta end_play has been replaced with blocks and conditions for these
blocks.

Fixes: #70 (Avoid using meta end_play)
2019-04-17 15:08:36 +02:00
Thomas Woerner
bbaaf1f74c ipa[server,replica,client]: Do not enforce ansible_fqdn as hostname
The ansible_fqdn hostname has been enforced to be set and used in
ipaserver, ipareplica and also ipaclient role. This has been removed as
the hostname should only be set if specified explicitly with
ipa[server,replica,client]_hostname.
2019-04-17 15:06:23 +02:00
Thomas Woerner
2cffd6ebf9 ipaclient_setup_ntp: Use time sync code from 4.6.4 if sync_time is not defined
The FreeIPA versions since 4.7.0 are using chrony and also the new
sync_time function for time synchronization which has been added to
ipaclient/install/client.py.

The old version in ipaclient_setup_ntp has been updated to the code that
has been used in 4.6.4.
2019-04-17 14:36:50 +02:00
Thomas Woerner
cdc431ff92 ipa[client,replica,server]: Make sure that installer logs are created
The installer logs have not been created using the ansible ipaclient,
ipareplica and ipaserver roles. This has been fixed and the installer
logs are created now. This is a new and fixed version of 2113c79 where
verbose mode is turned off.
2019-04-16 14:50:55 +02:00
Thomas Woerner
819bb5700e ipareplica/tasks/install.yml: Omit forward_policy if not set in ipareplica_test
forward_policy is only set in dns.install_test in ipareplica_test if
setup_dns is enabled. Therefore forward_policy will be ommited in this
case.
2019-04-05 19:16:17 +02:00
Thomas Woerner
658f830970 ipaclient_setup_ntp: Add missing cli_servers, fix options.ntp_servers check
cli_servers from ipaclient_test was missing in ipaclient_setup_ntp. This
resulted in a backtrace and is fixed now. Fix options.ntp_servers check
to not use length on NoneType.
2019-04-05 19:09:08 +02:00
Thomas Woerner
40905510ca ansible_ipa_replica: Add import of ntpinstance again
This is needed in ipareplica_setup_ds and has been removed before as part
of commit f33d234d5a.
2019-04-05 18:29:49 +02:00
Thomas Woerner
0b5b5756c7 Revert "ipa[client,replica,server]: Make sure that installer logs are created"
The call of standard_logging_setup results in verbose and debug output in
the ansible modules. This needs to be done in an altenative way.

This reverts commit 2113c79111.
2019-04-05 18:12:07 +02:00
Thomas Woerner
387f555560 ansible_ipa_server: Add missing inspect import
The inspect binding is needed because of the inspection of
validate_domain_name that has been introduced with commit
818db5cb4d for FreeIPA versions prior
to 4.7.
2019-04-05 12:25:49 +02:00
Thomas Woerner
15f650ccaa ipaclient: Fix issues with FreeIPA 4.6 and prior
check_ldap_conf is only available in FreeIPA 4.7 and later and
tasks.is_nosssd_supported is only available since 4.6.90.pre2.

check_ldap_conf is None (ansible_ipa_client) if it can not be imported.
hasattr has been added to check if is_nosssd_supported is a valid
attribute in tasks.

Fixes: #61 (ipaserver role - Fails on ipaclient install)
2019-04-04 17:28:37 +02:00
Thomas Woerner
818db5cb4d ipa[client,server]: Inspect validate_domain_name for 4.6 and prior
The entity argument for validate_domain_name is only available in
FreeIPA 4.7 and later. This has been fixed using inspect to be able to
detect if entity is a valid argument. If not the whole realm name check
is skipped.

Related: #61 (ipaserver role - Fails on ipaclient install)
Fixes: #66 (Python 2 error with validate_domain)
2019-04-04 17:20:15 +02:00
Thomas Woerner
25495d1e40 ipaserver_test: Do not show traceback in case of testing failures
ipaserver_test was not handling possible exceptions in the tests which
resulted in a traceback. This has been fixed.
2019-04-04 14:51:54 +02:00
Thomas Woerner
de039aa0c8 ipaclient: Use ipaclient_all_ip_addresses instead of ipahost_all_ip_addresses (2)
This setting had the wrong and unsed prefix ipahost. THis has been fixed and
the proper prefix ipaclient is now used.

The change in ipaclient/defaults/main.yml was missing from the first commit
b5d6dc00d2
2019-04-03 21:30:15 +02:00
Thomas Woerner
5d79745e88 ipareplica_test: Deactivate adtrust_imported and kra_imported tests
These test are failing because there is no adtrust_imported and
kra_imported setting yet in ansible_ipa_replica.
2019-04-03 19:16:21 +02:00
Thomas Woerner
7a2d2c5236 ipareplica_prepare: Properly fail if replica_conn_check failed
If replica_conn_check failed a back trace was printed instead of a proper
failure in ansible. Thias has been fixed.
2019-04-03 19:16:21 +02:00
Thomas Woerner
44ce7263de ipareplica: Fix DNS setup issues
The configuration of DNS failed because of missing DNS settings in the
ipareplica_prepare and ipareplica_setup_dns.

Some fixed settings for use with DNSInstallInterface have been added
to ansible_ipa_replica:

options.dnssec_master = False
options.disable_dnssec_master = False
options.kasp_db_file = None
options.force = False

Fixes: #58 (install-replica fails: reverse_zones seems to be empty)
Fixes: #63 (ipareplica_setup_dns fails)
2019-04-03 19:15:26 +02:00
Thomas Woerner
f33d234d5a ansible_ipa_server: Remove user_input, add missing DN and ntpinstance
Removed unused user_input import from ipapython.ipautil. Added import
of DN from ipapython.dn. Set ntpinstance to None if timeconf or
sync_time could not be imported on older FreeIPA releases.
2019-04-03 19:00:53 +02:00
Thomas Woerner
b6a562b818 ipaserver: Use ipaserver_install_packages for ipaclient deployment part
Use ipaserver_install_packages to enable or disable package installation
for the client deployment part with ipaclient role.
2019-04-03 19:00:53 +02:00
Thomas Woerner
995864cf52 ipareplica: Use ipareplica_install_packages for ipaclient deployment part
Use ipareplica_install_packages to enable or disable package installation
for the client deployment part with ipaclient role.
2019-04-03 19:00:53 +02:00
Thomas Woerner
b8885c8dfd ipareplica_enable_ipa: DO not create unused replica config
Replica config is not needed and there fore has been removed.
2019-04-03 19:00:53 +02:00
Thomas Woerner
69f0f1e59c ipareplica_setup_ds: Cleanup of unused dns settings in options
The dns settings in options have not been used and also not provided to
the module in the tasks file. Therefore these settings shoul dbe removed.
2019-04-03 19:00:53 +02:00
Thomas Woerner
cc942cb932 ipareplica_install_ca_certs: Cleanup of unused dns settings in options
The dns settings in options have not been used and also not provided to
the module in the tasks file. Therefore these settings shoul dbe removed.
2019-04-03 19:00:42 +02:00
Thomas Woerner
9bfd76a60f ipareplica_create_ipa_conf: Cleanup of unused dns settings in options
The dns settings in options have not been used and also not provided to
the module in the tasks file. Therefore these settings shoul dbe removed.
2019-04-03 18:55:32 +02:00
Thomas Woerner
88f5a68e10 ipareplica: Replace ipaserver_master_password, remove ipaserver_setup_ntp
ipaserver_master_password and ipaserver_setup_ntp have been linked from
the ipaserver role before. With the move of the module_utils parts to the
specific role locations the use of ipaserver modules leads to the missing
dependency ansible_ipa_server, that is now only available in the server
role.

The ipaserver_master_password module has been replaced by the ipareplica
specific ipareplica_master_password module. The ipaserver_setup_ntp module
has been removed as the time related changes for replica are done in the
client install part.

Fixes: #59 (Module is missing interpreter line)
2019-04-03 18:37:50 +02:00