ipaserver_setup_ds: Fix tasks.create_tmpfiles_dirs call (issue#19) (2nd try)

tasks.create_tmpfiles_dirs only needs IPAAPI_USER as an argument for
version 4.5.4. For 4.5 there is no support for arguments.

IPAAPI_USER is therefore only needed for 4.5.4 in
module_utils/ansible_ipa_server.py
This commit is contained in:
Thomas Woerner
2018-06-21 12:00:24 +02:00
parent 1ecc194ca6
commit ab14ce4e37
2 changed files with 5 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ if NUM_VERSION >= 40500:
from ipaplatform.tasks import tasks
from ipalib import api, errors, x509
from ipalib.constants import DOMAIN_LEVEL_0, MIN_DOMAIN_LEVEL, MAX_DOMAIN_LEVEL
if NUM_VERSION < 40600:
if NUM_VERSION == 40504:
from ipalib.constants import IPAAPI_USER
from ipalib.util import (
validate_domain_name,

View File

@@ -124,8 +124,10 @@ def main():
# setup DS ##############################################################
if NUM_VERSION < 40600:
# Make sure tmpfiles dir exist before installing components
# Make sure tmpfiles dir exist before installing components
if NUM_VERSION == 40504:
tasks.create_tmpfiles_dirs(IPAAPI_USER)
elif NUM_VERSION >= 40500 and NUM_VERSION <= 40503:
tasks.create_tmpfiles_dirs()
# Create a directory server instance