mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-29 10:54:44 +00:00
Merge pull request #691 from t-woerner/master_automationhub_fixes
Changes needed to pass Automation Hub tests
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
|
|
||||||
class ModuleDocFragment(object): # pylint: disable=R0205,R0903
|
class ModuleDocFragment(object): # pylint: disable=R0205,R0903
|
||||||
DOCUMENTATION = r"""
|
DOCUMENTATION = r"""
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
__all__ = ["gssapi", "netaddr", "api", "ipalib_errors", "Env",
|
__all__ = ["gssapi", "netaddr", "api", "ipalib_errors", "Env",
|
||||||
"DEFAULT_CONFIG", "LDAP_GENERALIZED_TIME_FORMAT",
|
"DEFAULT_CONFIG", "LDAP_GENERALIZED_TIME_FORMAT",
|
||||||
"kinit_password", "kinit_keytab", "run", "DN", "VERSION",
|
"kinit_password", "kinit_keytab", "run", "DN", "VERSION",
|
||||||
@@ -100,7 +103,7 @@ else:
|
|||||||
|
|
||||||
import socket
|
import socket
|
||||||
import base64
|
import base64
|
||||||
import six
|
from ansible.module_utils import six
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from collections.abc import Mapping # noqa
|
from collections.abc import Mapping # noqa
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -21,6 +20,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
@@ -100,7 +102,7 @@ EXAMPLES = """
|
|||||||
state: present
|
state: present
|
||||||
inclusive:
|
inclusive:
|
||||||
- key: "mail"
|
- key: "mail"
|
||||||
expression: "example.com$
|
expression: "example.com"
|
||||||
|
|
||||||
# Delete an automember rule
|
# Delete an automember rule
|
||||||
- ipaautomember:
|
- ipaautomember:
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Authors:
|
# Authors:
|
||||||
# Chris Procter <cprocter@redhat.com>
|
# Chris Procter <cprocter@redhat.com>
|
||||||
@@ -19,6 +18,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -21,6 +20,10 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
"""DNS Record ansible-freeipa module."""
|
"""DNS Record ansible-freeipa module."""
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
@@ -866,8 +869,7 @@ from ansible.module_utils.ansible_freeipa_module import \
|
|||||||
import dns.reversename
|
import dns.reversename
|
||||||
import dns.resolver
|
import dns.resolver
|
||||||
|
|
||||||
import six
|
from ansible.module_utils import six
|
||||||
|
|
||||||
|
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
unicode = str
|
unicode = str
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
@@ -207,7 +210,7 @@ from ansible.module_utils.ansible_freeipa_module import (
|
|||||||
ipalib_errors
|
ipalib_errors
|
||||||
) # noqa: E402
|
) # noqa: E402
|
||||||
import netaddr
|
import netaddr
|
||||||
import six
|
from ansible.module_utils import six
|
||||||
|
|
||||||
|
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
@@ -403,7 +406,7 @@ host:
|
|||||||
from ansible.module_utils.ansible_freeipa_module import \
|
from ansible.module_utils.ansible_freeipa_module import \
|
||||||
IPAAnsibleModule, compare_args_ipa, gen_add_del_lists, \
|
IPAAnsibleModule, compare_args_ipa, gen_add_del_lists, \
|
||||||
encode_certificate, is_ipv4_addr, is_ipv6_addr, ipalib_errors
|
encode_certificate, is_ipv4_addr, is_ipv6_addr, ipalib_errors
|
||||||
import six
|
from ansible.module_utils import six
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
unicode = str
|
unicode = str
|
||||||
|
|
||||||
@@ -436,7 +439,7 @@ def find_dnsrecord(module, name):
|
|||||||
This function may raise ipalib_errors.NotFound in some cases,
|
This function may raise ipalib_errors.NotFound in some cases,
|
||||||
and it should be handled by the caller.
|
and it should be handled by the caller.
|
||||||
"""
|
"""
|
||||||
domain_name = name[name.find(".")+1:]
|
domain_name = name[name.find(".") + 1:]
|
||||||
host_name = name[:name.find(".")]
|
host_name = name[:name.find(".")]
|
||||||
|
|
||||||
_args = {
|
_args = {
|
||||||
@@ -1228,7 +1231,7 @@ def main():
|
|||||||
}])
|
}])
|
||||||
|
|
||||||
if len(dnsrecord_a_add) > 0 or len(dnsrecord_aaaa_add) > 0:
|
if len(dnsrecord_a_add) > 0 or len(dnsrecord_aaaa_add) > 0:
|
||||||
domain_name = name[name.find(".")+1:]
|
domain_name = name[name.find(".") + 1:]
|
||||||
host_name = name[:name.find(".")]
|
host_name = name[:name.find(".")]
|
||||||
|
|
||||||
_args = {"idnsname": host_name}
|
_args = {"idnsname": host_name}
|
||||||
@@ -1245,7 +1248,7 @@ def main():
|
|||||||
"dnsrecord_add", _args])
|
"dnsrecord_add", _args])
|
||||||
|
|
||||||
if len(dnsrecord_a_del) > 0 or len(dnsrecord_aaaa_del) > 0:
|
if len(dnsrecord_a_del) > 0 or len(dnsrecord_aaaa_del) > 0:
|
||||||
domain_name = name[name.find(".")+1:]
|
domain_name = name[name.find(".") + 1:]
|
||||||
host_name = name[:name.find(".")]
|
host_name = name[:name.find(".")]
|
||||||
|
|
||||||
# There seems to be an issue with dnsrecord_del (not
|
# There seems to be an issue with dnsrecord_del (not
|
||||||
@@ -1361,7 +1364,7 @@ def main():
|
|||||||
|
|
||||||
if "arecord" in dnsrecord_args or \
|
if "arecord" in dnsrecord_args or \
|
||||||
"aaaarecord" in dnsrecord_args:
|
"aaaarecord" in dnsrecord_args:
|
||||||
domain_name = name[name.find(".")+1:]
|
domain_name = name[name.find(".") + 1:]
|
||||||
host_name = name[:name.find(".")]
|
host_name = name[:name.find(".")]
|
||||||
dnsrecord_args["idnsname"] = host_name
|
dnsrecord_args["idnsname"] = host_name
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
"""ansible-freeipa module to manage FreeIPA privileges."""
|
"""ansible-freeipa module to manage FreeIPA privileges."""
|
||||||
|
|
||||||
|
|
||||||
@@ -110,7 +113,7 @@ RETURN = """
|
|||||||
from ansible.module_utils.ansible_freeipa_module import \
|
from ansible.module_utils.ansible_freeipa_module import \
|
||||||
IPAAnsibleModule, compare_args_ipa, gen_add_del_lists, gen_add_list, \
|
IPAAnsibleModule, compare_args_ipa, gen_add_del_lists, gen_add_list, \
|
||||||
gen_intersection_list
|
gen_intersection_list
|
||||||
import six
|
from ansible.module_utils import six
|
||||||
|
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
unicode = str
|
unicode = str
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""ansible-freeipa iparole module implementation."""
|
"""ansible-freeipa iparole module implementation."""
|
||||||
|
|
||||||
@@ -21,6 +20,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
@@ -101,7 +104,7 @@ EXAMPLES = """
|
|||||||
from ansible.module_utils._text import to_text
|
from ansible.module_utils._text import to_text
|
||||||
from ansible.module_utils.ansible_freeipa_module import \
|
from ansible.module_utils.ansible_freeipa_module import \
|
||||||
IPAAnsibleModule, gen_add_del_lists, compare_args_ipa
|
IPAAnsibleModule, gen_add_del_lists, compare_args_ipa
|
||||||
import six
|
from ansible.module_utils import six
|
||||||
|
|
||||||
|
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
@@ -183,21 +186,23 @@ EXAMPLES = """
|
|||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
name: HTTP/www.example.com
|
name: HTTP/www.example.com
|
||||||
certificate:
|
certificate:
|
||||||
- MIIC/zCCAeegAwIBAgIUMNHIbn+hhrOVew/2WbkteisV29QwDQYJKoZIhvcNAQELBQAw
|
- >
|
||||||
DzENMAsGA1UEAwwEdGVzdDAeFw0yMDAyMDQxNDQxMDhaFw0zMDAyMDExNDQxMDhaMA8xDT
|
MIIC/zCCAeegAwIBAgIUMNHIbn+hhrOVew/2WbkteisV29QwDQYJKoZIhvcNAQELBQAw
|
||||||
ALBgNVBAMMBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+XVVGFYpH
|
DzENMAsGA1UEAwwEdGVzdDAeFw0yMDAyMDQxNDQxMDhaFw0zMDAyMDExNDQxMDhaMA8x
|
||||||
VkcDfVnNInE1Y/pFciegdzqTjMwUWlRL4Zt3u96GhaMLRbtk+OfEkzLUAhWBOwEraELJzM
|
DTALBgNVBAMMBHRlc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+XVVG
|
||||||
LJOMvjYF3C+TiGO7dStFLikZmccuSsSIXjnzIPwBXa8KvgRVRyGLoVvGbLJvmjfMXp0nIT
|
FYpHVkcDfVnNInE1Y/pFciegdzqTjMwUWlRL4Zt3u96GhaMLRbtk+OfEkzLUAhWBOwEr
|
||||||
oTx/i74KF9S++WEes9H5ErJ99CDhLKFgq0amnvsgparYXhypHaRLnikn0vQINt55YoEd1s
|
aELJzMLJOMvjYF3C+TiGO7dStFLikZmccuSsSIXjnzIPwBXa8KvgRVRyGLoVvGbLJvmj
|
||||||
4KrvEcD2VdZkIMPbLRu2zFvMprF3cjQQG4LT9ggfEXNIPZ1nQWAnAsu7OJEkNF+E4Mkmpc
|
fMXp0nIToTx/i74KF9S++WEes9H5ErJ99CDhLKFgq0amnvsgparYXhypHaRLnikn0vQI
|
||||||
xj9aGUVt5bsq1D+Tzj3GsidSX0nSNcZ2JltXRnL/5v63g5cZyE+nAgMBAAGjUzBRMB0GA1
|
Nt55YoEd1s4KrvEcD2VdZkIMPbLRu2zFvMprF3cjQQG4LT9ggfEXNIPZ1nQWAnAsu7OJ
|
||||||
UdDgQWBBRV0j7JYukuH/r/t9+QeNlRLXDlEDAfBgNVHSMEGDAWgBRV0j7JYukuH/r/t9+Q
|
EkNF+E4Mkmpcxj9aGUVt5bsq1D+Tzj3GsidSX0nSNcZ2JltXRnL/5v63g5cZyE+nAgMB
|
||||||
eNlRLXDlEDAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCgVy1+1kNwHs
|
AAGjUzBRMB0GA1UdDgQWBBRV0j7JYukuH/r/t9+QeNlRLXDlEDAfBgNVHSMEGDAWgBRV
|
||||||
5y1Zp0WjMWGCJC6/zw7FDG4OW5r2GJiCXZYdJ0UonY9ZtoVLJPrp2/DAv1m5DtnDhBYqic
|
0j7JYukuH/r/t9+QeNlRLXDlEDAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUA
|
||||||
uPgLzEkOS1KdTi20Otm/J4yxLLrZC5W4x0XOeSVPXOJuQWfwQ5pPvKkn6WxYUYkGwIt1OH
|
A4IBAQCgVy1+1kNwHs5y1Zp0WjMWGCJC6/zw7FDG4OW5r2GJiCXZYdJ0UonY9ZtoVLJP
|
||||||
2nSMngkbami3CbSmKZOCpgQIiSlQeDJ8oGjWFMLDymYSHoVOIXHwNoooyEiaio3693l6no
|
rp2/DAv1m5DtnDhBYqicuPgLzEkOS1KdTi20Otm/J4yxLLrZC5W4x0XOeSVPXOJuQWfw
|
||||||
obyGv49zyCVLVR1DC7i6RJ186ql0av+D4vPoiF5mX7+sKC2E8xEj9uKQ5GTWRh59VnRBVC
|
Q5pPvKkn6WxYUYkGwIt1OH2nSMngkbami3CbSmKZOCpgQIiSlQeDJ8oGjWFMLDymYSHo
|
||||||
/SiMJ/H78tJnBAvoBwXxSEvj8Z3Kjm/BQqZfv4IBsA5yqV7MVq
|
VOIXHwNoooyEiaio3693l6noobyGv49zyCVLVR1DC7i6RJ186ql0av+D4vPoiF5mX7+s
|
||||||
|
KC2E8xEj9uKQ5GTWRh59VnRBVC/SiMJ/H78tJnBAvoBwXxSEvj8Z3Kjm/BQqZfv4IBsA
|
||||||
|
5yqV7MVq
|
||||||
action: member
|
action: member
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
@@ -285,7 +290,8 @@ def gen_args_smb(netbiosname, ok_as_delegate, ok_to_auth_as_delegate):
|
|||||||
|
|
||||||
|
|
||||||
def check_parameters(module, state, action, names, parameters):
|
def check_parameters(module, state, action, names, parameters):
|
||||||
assert isinstance(parameters, dict)
|
if not isinstance(parameters, dict):
|
||||||
|
raise AssertionError("parameters is not a dict")
|
||||||
|
|
||||||
# invalid parameters for everything but state 'present', action 'service'.
|
# invalid parameters for everything but state 'present', action 'service'.
|
||||||
invalid = ['pac_type', 'auth_ind', 'skip_host_check',
|
invalid = ['pac_type', 'auth_ind', 'skip_host_check',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
'status': ['preview'],
|
'status': ['preview'],
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
@@ -472,7 +475,7 @@ user:
|
|||||||
from ansible.module_utils.ansible_freeipa_module import \
|
from ansible.module_utils.ansible_freeipa_module import \
|
||||||
IPAAnsibleModule, compare_args_ipa, gen_add_del_lists, date_format, \
|
IPAAnsibleModule, compare_args_ipa, gen_add_del_lists, date_format, \
|
||||||
encode_certificate, load_cert_from_str, DN_x500_text, to_text
|
encode_certificate, load_cert_from_str, DN_x500_text, to_text
|
||||||
import six
|
from ansible.module_utils import six
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
unicode = str
|
unicode = str
|
||||||
|
|
||||||
@@ -696,8 +699,8 @@ def check_certmapdata(data):
|
|||||||
|
|
||||||
i = data.find("<I>", 4)
|
i = data.find("<I>", 4)
|
||||||
s = data.find("<S>", i) # pylint: disable=invalid-name
|
s = data.find("<S>", i) # pylint: disable=invalid-name
|
||||||
issuer = data[i+3:s]
|
issuer = data[i + 3:s]
|
||||||
subject = data[s+3:]
|
subject = data[s + 3:]
|
||||||
|
|
||||||
if i < 0 or s < 0 or "CN" not in issuer or "CN" not in subject:
|
if i < 0 or s < 0 or "CN" not in issuer or "CN" not in subject:
|
||||||
return False
|
return False
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
"metadata_version": "1.0",
|
"metadata_version": "1.0",
|
||||||
"supported_by": "community",
|
"supported_by": "community",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
@@ -40,7 +43,8 @@ author:
|
|||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Get IPA_BACKUP_DIR from ipaplatform
|
# Get IPA_BACKUP_DIR from ipaplatform
|
||||||
- name: ipabackup_get_backup_dir:
|
- name: Get IPA_BACKUP_DIR from ipaplatform
|
||||||
|
ipabackup_get_backup_dir:
|
||||||
register result
|
register result
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import gssapi
|
import gssapi
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.0',
|
ANSIBLE_METADATA = {'metadata_version': '1.0',
|
||||||
'status': ['preview'],
|
'status': ['preview'],
|
||||||
'supported_by': 'community'}
|
'supported_by': 'community'}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.0',
|
ANSIBLE_METADATA = {'metadata_version': '1.0',
|
||||||
'status': ['preview'],
|
'status': ['preview'],
|
||||||
'supported_by': 'community'}
|
'supported_by': 'community'}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
DOCUMENTATION = """
|
DOCUMENTATION = """
|
||||||
---
|
---
|
||||||
module: ipaclient_get_facts
|
module: ipaclient_get_facts
|
||||||
@@ -12,9 +15,9 @@ author:
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import six
|
from ansible.module_utils import six
|
||||||
try:
|
try:
|
||||||
from six.moves.configparser import RawConfigParser
|
from ansible.module_utils.six.moves.configparser import RawConfigParser
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from ConfigParser import RawConfigParser
|
from ConfigParser import RawConfigParser
|
||||||
|
|
||||||
@@ -81,7 +84,8 @@ def is_dogtag_configured(subsystem):
|
|||||||
# ca / kra is configured when the directory
|
# ca / kra is configured when the directory
|
||||||
# /var/lib/pki/pki-tomcat/[ca|kra] # exists
|
# /var/lib/pki/pki-tomcat/[ca|kra] # exists
|
||||||
available_subsystems = {'ca', 'kra'}
|
available_subsystems = {'ca', 'kra'}
|
||||||
assert subsystem in available_subsystems
|
if subsystem not in available_subsystems:
|
||||||
|
raise AssertionError("Subsystem '%s' not available" % subsystem)
|
||||||
|
|
||||||
return os.path.isdir(os.path.join(VAR_LIB_PKI_TOMCAT, subsystem))
|
return os.path.isdir(os.path.join(VAR_LIB_PKI_TOMCAT, subsystem))
|
||||||
|
|
||||||
@@ -120,7 +124,7 @@ def get_ipa_conf():
|
|||||||
basedn=basedn,
|
basedn=basedn,
|
||||||
realm=realm,
|
realm=realm,
|
||||||
domain=domain
|
domain=domain
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_ipa_version():
|
def get_ipa_version():
|
||||||
@@ -147,7 +151,7 @@ def get_ipa_version():
|
|||||||
vendor_version=version.VENDOR_VERSION,
|
vendor_version=version.VENDOR_VERSION,
|
||||||
version=version.VERSION,
|
version=version.VERSION,
|
||||||
version_info=version_info
|
version_info=version_info
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -193,7 +197,7 @@ def main():
|
|||||||
module.exit_json(
|
module.exit_json(
|
||||||
changed=False,
|
changed=False,
|
||||||
ansible_facts=dict(ipa=facts)
|
ansible_facts=dict(ipa=facts)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -20,6 +19,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.0',
|
ANSIBLE_METADATA = {'metadata_version': '1.0',
|
||||||
'status': ['preview'],
|
'status': ['preview'],
|
||||||
'supported_by': 'community'}
|
'supported_by': 'community'}
|
||||||
@@ -121,9 +124,9 @@ host:
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible.module_utils import six
|
||||||
|
|
||||||
from ipalib import api, errors
|
from ipalib import api, errors
|
||||||
from ipaplatform.paths import paths
|
from ipaplatform.paths import paths
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
@@ -179,7 +182,7 @@ def main():
|
|||||||
if password is None and admin_keytab is None:
|
if password is None and admin_keytab is None:
|
||||||
module.fail_json(msg="Password or admin_keytab is needed")
|
module.fail_json(msg="Password or admin_keytab is needed")
|
||||||
|
|
||||||
client_domain = hostname[hostname.find(".")+1:]
|
client_domain = hostname[hostname.find(".") + 1:]
|
||||||
nolog = tuple()
|
nolog = tuple()
|
||||||
env = {'PATH': SECURE_PATH}
|
env = {'PATH': SECURE_PATH}
|
||||||
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
|
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
@@ -156,7 +159,7 @@ def main():
|
|||||||
options.krb5_offline_passwords = not options.no_krb5_offline_passwords
|
options.krb5_offline_passwords = not options.no_krb5_offline_passwords
|
||||||
|
|
||||||
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
|
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
|
||||||
client_domain = hostname[hostname.find(".")+1:]
|
client_domain = hostname[hostname.find(".") + 1:]
|
||||||
|
|
||||||
if configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server,
|
if configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server,
|
||||||
options, client_domain, hostname):
|
options, client_domain, hostname):
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
@@ -197,7 +200,7 @@ import socket
|
|||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from six.moves.configparser import RawConfigParser
|
from ansible.module_utils.six.moves.configparser import RawConfigParser
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from ConfigParser import RawConfigParser
|
from ConfigParser import RawConfigParser
|
||||||
|
|
||||||
@@ -319,7 +322,7 @@ def main():
|
|||||||
if options.domain_name is None and options.servers is not None:
|
if options.domain_name is None and options.servers is not None:
|
||||||
if len(options.servers) > 0:
|
if len(options.servers) > 0:
|
||||||
options.domain_name = options.servers[0][
|
options.domain_name = options.servers[0][
|
||||||
options.servers[0].find(".")+1:]
|
options.servers[0].find(".") + 1:]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self = options
|
self = options
|
||||||
@@ -701,7 +704,7 @@ def main():
|
|||||||
cli_domain_source = ds.domain_source
|
cli_domain_source = ds.domain_source
|
||||||
logger.debug("will use discovered domain: %s", cli_domain)
|
logger.debug("will use discovered domain: %s", cli_domain)
|
||||||
|
|
||||||
client_domain = hostname[hostname.find(".")+1:]
|
client_domain = hostname[hostname.find(".") + 1:]
|
||||||
|
|
||||||
if ret in (ipadiscovery.NO_LDAP_SERVER, ipadiscovery.NOT_IPA_SERVER) \
|
if ret in (ipadiscovery.NO_LDAP_SERVER, ipadiscovery.NOT_IPA_SERVER) \
|
||||||
or not ds.server:
|
or not ds.server:
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
@@ -131,7 +134,7 @@ def main():
|
|||||||
kdc = module.params.get('kdc')
|
kdc = module.params.get('kdc')
|
||||||
kinit_attempts = module.params.get('kinit_attempts')
|
kinit_attempts = module.params.get('kinit_attempts')
|
||||||
|
|
||||||
client_domain = hostname[hostname.find(".")+1:]
|
client_domain = hostname[hostname.find(".") + 1:]
|
||||||
host_principal = 'host/%s@%s' % (hostname, realm)
|
host_principal = 'host/%s@%s' % (hostname, realm)
|
||||||
sssd = True
|
sssd = True
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
__all__ = ["gssapi", "version", "ipadiscovery", "api", "errors", "x509",
|
__all__ = ["gssapi", "version", "ipadiscovery", "api", "errors", "x509",
|
||||||
"constants", "sysrestore", "certmonger", "certstore",
|
"constants", "sysrestore", "certmonger", "certstore",
|
||||||
"delete_persistent_client_session_data", "ScriptError",
|
"delete_persistent_client_session_data", "ScriptError",
|
||||||
@@ -60,7 +63,7 @@ else:
|
|||||||
# See ipapython/version.py
|
# See ipapython/version.py
|
||||||
IPA_MAJOR, IPA_MINOR, IPA_RELEASE = [int(x) for x in
|
IPA_MAJOR, IPA_MINOR, IPA_RELEASE = [int(x) for x in
|
||||||
VERSION.split(".", 2)]
|
VERSION.split(".", 2)]
|
||||||
IPA_PYTHON_VERSION = IPA_MAJOR*10000 + IPA_MINOR*100 + IPA_RELEASE
|
IPA_PYTHON_VERSION = IPA_MAJOR * 10000 + IPA_MINOR * 100 + IPA_RELEASE
|
||||||
else:
|
else:
|
||||||
IPA_PYTHON_VERSION = NUM_VERSION
|
IPA_PYTHON_VERSION = NUM_VERSION
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
@@ -63,7 +64,6 @@ RETURN = '''
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import six
|
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.ansible_ipa_replica import (
|
from ansible.module_utils.ansible_ipa_replica import (
|
||||||
@@ -72,6 +72,8 @@ from ansible.module_utils.ansible_ipa_replica import (
|
|||||||
gen_remote_api, api
|
gen_remote_api, api
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from ansible.module_utils import six
|
||||||
|
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
unicode = str
|
unicode = str
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
@@ -194,7 +195,6 @@ RETURN = '''
|
|||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import traceback
|
import traceback
|
||||||
import six
|
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
@@ -209,6 +209,7 @@ from ansible.module_utils.ansible_ipa_replica import (
|
|||||||
dns, no_matching_interface_for_ip_address_warning, adtrust,
|
dns, no_matching_interface_for_ip_address_warning, adtrust,
|
||||||
constants, api, redirect_stdout, replica_conn_check, tasks
|
constants, api, redirect_stdout, replica_conn_check, tasks
|
||||||
)
|
)
|
||||||
|
from ansible.module_utils import six
|
||||||
|
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
unicode = str
|
unicode = str
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
@@ -249,7 +252,8 @@ def main():
|
|||||||
|
|
||||||
# If not defined, set domain from server name
|
# If not defined, set domain from server name
|
||||||
if installer.domain_name is None and installer.server is not None:
|
if installer.domain_name is None and installer.server is not None:
|
||||||
installer.domain_name = installer.server[installer.server.find(".")+1:]
|
installer.domain_name = \
|
||||||
|
installer.server[installer.server.find(".") + 1:]
|
||||||
# If not defined, set realm from domain name
|
# If not defined, set realm from domain name
|
||||||
if installer.realm_name is None and installer.domain_name is not None:
|
if installer.realm_name is None and installer.domain_name is not None:
|
||||||
installer.realm_name = installer.domain_name.upper()
|
installer.realm_name = installer.domain_name.upper()
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
__all__ = ["contextlib", "dnsexception", "dnsresolver", "dnsreversename",
|
__all__ = ["contextlib", "dnsexception", "dnsresolver", "dnsreversename",
|
||||||
"parse_version", "IPAChangeConf",
|
"parse_version", "IPAChangeConf",
|
||||||
"certstore", "sysrestore", "ipa_generate_password", "kinit_keytab",
|
"certstore", "sysrestore", "ipa_generate_password", "kinit_keytab",
|
||||||
@@ -62,7 +65,7 @@ else:
|
|||||||
# See ipapython/version.py
|
# See ipapython/version.py
|
||||||
IPA_MAJOR, IPA_MINOR, IPA_RELEASE = [int(x) for x in
|
IPA_MAJOR, IPA_MINOR, IPA_RELEASE = [int(x) for x in
|
||||||
VERSION.split(".", 2)]
|
VERSION.split(".", 2)]
|
||||||
IPA_PYTHON_VERSION = IPA_MAJOR*10000 + IPA_MINOR*100 + IPA_RELEASE
|
IPA_PYTHON_VERSION = IPA_MAJOR * 10000 + IPA_MINOR * 100 + IPA_RELEASE
|
||||||
else:
|
else:
|
||||||
IPA_PYTHON_VERSION = NUM_VERSION
|
IPA_PYTHON_VERSION = NUM_VERSION
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,7 +21,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
ANSIBLE_METADATA = {
|
ANSIBLE_METADATA = {
|
||||||
'metadata_version': '1.0',
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community',
|
'supported_by': 'community',
|
||||||
@@ -209,7 +212,6 @@ RETURN = '''
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import six
|
|
||||||
import inspect
|
import inspect
|
||||||
import random
|
import random
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
@@ -226,6 +228,7 @@ from ansible.module_utils.ansible_ipa_server import (
|
|||||||
validate_domain_name, load_pkcs12, IPA_PYTHON_VERSION,
|
validate_domain_name, load_pkcs12, IPA_PYTHON_VERSION,
|
||||||
encode_certificate, check_available_memory
|
encode_certificate, check_available_memory
|
||||||
)
|
)
|
||||||
|
from ansible.module_utils import six
|
||||||
|
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
unicode = str
|
unicode = str
|
||||||
@@ -923,7 +926,7 @@ def main():
|
|||||||
host_name = host_name.lower()
|
host_name = host_name.lower()
|
||||||
|
|
||||||
if not options.domain_name:
|
if not options.domain_name:
|
||||||
domain_name = host_name[host_name.find(".")+1:]
|
domain_name = host_name[host_name.find(".") + 1:]
|
||||||
try:
|
try:
|
||||||
validate_domain_name(domain_name)
|
validate_domain_name(domain_name)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Authors:
|
# Authors:
|
||||||
@@ -22,6 +21,10 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
__all__ = ["IPAChangeConf", "certmonger", "sysrestore", "root_logger",
|
__all__ = ["IPAChangeConf", "certmonger", "sysrestore", "root_logger",
|
||||||
"ipa_generate_password", "run", "ScriptError", "services",
|
"ipa_generate_password", "run", "ScriptError", "services",
|
||||||
"tasks", "errors", "x509", "DOMAIN_LEVEL_0", "MIN_DOMAIN_LEVEL",
|
"tasks", "errors", "x509", "DOMAIN_LEVEL_0", "MIN_DOMAIN_LEVEL",
|
||||||
@@ -52,7 +55,7 @@ else:
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
from contextlib import contextmanager as contextlib_contextmanager
|
from contextlib import contextmanager as contextlib_contextmanager
|
||||||
import six
|
from ansible.module_utils import six
|
||||||
import base64
|
import base64
|
||||||
|
|
||||||
from ipapython.version import NUM_VERSION, VERSION
|
from ipapython.version import NUM_VERSION, VERSION
|
||||||
@@ -61,7 +64,7 @@ else:
|
|||||||
# See ipapython/version.py
|
# See ipapython/version.py
|
||||||
IPA_MAJOR, IPA_MINOR, IPA_RELEASE = [int(x) for x in
|
IPA_MAJOR, IPA_MINOR, IPA_RELEASE = [int(x) for x in
|
||||||
VERSION.split(".", 2)]
|
VERSION.split(".", 2)]
|
||||||
IPA_PYTHON_VERSION = IPA_MAJOR*10000 + IPA_MINOR*100 + IPA_RELEASE
|
IPA_PYTHON_VERSION = IPA_MAJOR * 10000 + IPA_MINOR * 100 + IPA_RELEASE
|
||||||
else:
|
else:
|
||||||
IPA_PYTHON_VERSION = NUM_VERSION
|
IPA_PYTHON_VERSION = NUM_VERSION
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ disable =
|
|||||||
fixme
|
fixme
|
||||||
|
|
||||||
[pylint.BASIC]
|
[pylint.BASIC]
|
||||||
good-names = ex, i, j, k, Run, _, e, x, dn, cn, ip, os, unicode
|
good-names = ex, i, j, k, Run, _, e, x, dn, cn, ip, os, unicode, __metaclass__
|
||||||
|
|
||||||
[pylint.IMPORTS]
|
[pylint.IMPORTS]
|
||||||
ignored-modules =
|
ignored-modules =
|
||||||
|
|||||||
@@ -21,36 +21,36 @@ function generate_ipa_pkcs12_certificate {
|
|||||||
# Generate CSR and private key
|
# Generate CSR and private key
|
||||||
openssl req -new -newkey rsa:4096 -nodes \
|
openssl req -new -newkey rsa:4096 -nodes \
|
||||||
-subj "/C=US/ST=Test/L=Testing/O=Default/CN=${ipa_fqdn}" \
|
-subj "/C=US/ST=Test/L=Testing/O=Default/CN=${ipa_fqdn}" \
|
||||||
-keyout ${certs_dir}/private.key \
|
-keyout "${certs_dir}/private.key" \
|
||||||
-out ${certs_dir}/request.csr
|
-out "${certs_dir}/request.csr"
|
||||||
|
|
||||||
# Sign CSR to generate PEM certificate
|
# Sign CSR to generate PEM certificate
|
||||||
if [ -z "${extensions_file}" ]; then
|
if [ -z "${extensions_file}" ]; then
|
||||||
openssl x509 -req -days 365 -sha256 \
|
openssl x509 -req -days 365 -sha256 \
|
||||||
-CAcreateserial \
|
-CAcreateserial \
|
||||||
-CA ${root_ca_cert} \
|
-CA "${root_ca_cert}" \
|
||||||
-CAkey ${root_ca_private_key} \
|
-CAkey "${root_ca_private_key}" \
|
||||||
-in ${certs_dir}/request.csr \
|
-in "${certs_dir}/request.csr" \
|
||||||
-out ${certs_dir}/cert.pem
|
-out "${certs_dir}/cert.pem"
|
||||||
else
|
else
|
||||||
openssl x509 -req -days 365 -sha256 \
|
openssl x509 -req -days 365 -sha256 \
|
||||||
-CAcreateserial \
|
-CAcreateserial \
|
||||||
-CA ${ROOT_CA_DIR}/cert.pem \
|
-CA "${ROOT_CA_DIR}/cert.pem" \
|
||||||
-CAkey ${ROOT_CA_DIR}/private.key \
|
-CAkey "${ROOT_CA_DIR}/private.key" \
|
||||||
-extfile ${extensions_file} \
|
-extfile "${extensions_file}" \
|
||||||
-extensions ${extensions_name} \
|
-extensions "${extensions_name}" \
|
||||||
-in ${certs_dir}/request.csr \
|
-in "${certs_dir}/request.csr" \
|
||||||
-out ${certs_dir}/cert.pem
|
-out "${certs_dir}/cert.pem"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Convert certificate to PKCS12 format
|
# Convert certificate to PKCS12 format
|
||||||
openssl pkcs12 -export \
|
openssl pkcs12 -export \
|
||||||
-name ${cert_name} \
|
-name "${cert_name}" \
|
||||||
-certfile ${root_ca_cert} \
|
-certfile "${root_ca_cert}" \
|
||||||
-in ${certs_dir}/cert.pem \
|
-in "${certs_dir}/cert.pem" \
|
||||||
-inkey ${certs_dir}/private.key \
|
-inkey "${certs_dir}/private.key" \
|
||||||
-passout "pass:${PKCS12_PASSWORD}" \
|
-passout "pass:${PKCS12_PASSWORD}" \
|
||||||
-out ${certs_dir}/cert.p12
|
-out "${certs_dir}/cert.p12"
|
||||||
}
|
}
|
||||||
|
|
||||||
# generate_ipa_pkcs12_certificates $ipa_fqdn $ipa_domain
|
# generate_ipa_pkcs12_certificates $ipa_fqdn $ipa_domain
|
||||||
@@ -73,27 +73,27 @@ function generate_ipa_pkcs12_certificates {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate certificates folder structure
|
# Generate certificates folder structure
|
||||||
mkdir -p ${ROOT_CA_DIR}
|
mkdir -p "${ROOT_CA_DIR}"
|
||||||
mkdir -p ${DIRSRV_CERTS_DIR}/$host
|
mkdir -p "${DIRSRV_CERTS_DIR}/$host"
|
||||||
mkdir -p ${HTTPD_CERTS_DIR}/$host
|
mkdir -p "${HTTPD_CERTS_DIR}/$host"
|
||||||
mkdir -p ${PKINIT_CERTS_DIR}/$host
|
mkdir -p "${PKINIT_CERTS_DIR}/$host"
|
||||||
|
|
||||||
# Generate root CA
|
# Generate root CA
|
||||||
if [ ! -f "${ROOT_CA_DIR}/private.key" ]; then
|
if [ ! -f "${ROOT_CA_DIR}/private.key" ]; then
|
||||||
openssl genrsa \
|
openssl genrsa \
|
||||||
-out ${ROOT_CA_DIR}/private.key 4096
|
-out "${ROOT_CA_DIR}/private.key" 4096
|
||||||
|
|
||||||
openssl req -new -x509 -sha256 -nodes -days 3650 \
|
openssl req -new -x509 -sha256 -nodes -days 3650 \
|
||||||
-subj "/C=US/ST=Test/L=Testing/O=Default" \
|
-subj "/C=US/ST=Test/L=Testing/O=Default" \
|
||||||
-key ${ROOT_CA_DIR}/private.key \
|
-key "${ROOT_CA_DIR}/private.key" \
|
||||||
-out ${ROOT_CA_DIR}/cert.pem
|
-out "${ROOT_CA_DIR}/cert.pem"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate a certificate for the Directory Server
|
# Generate a certificate for the Directory Server
|
||||||
if [ ! -f "${DIRSRV_CERTS_DIR}/$host/cert.pem" ]; then
|
if [ ! -f "${DIRSRV_CERTS_DIR}/$host/cert.pem" ]; then
|
||||||
generate_ipa_pkcs12_certificate \
|
generate_ipa_pkcs12_certificate \
|
||||||
"dirsrv-cert" \
|
"dirsrv-cert" \
|
||||||
$host \
|
"$host" \
|
||||||
"${DIRSRV_CERTS_DIR}/$host" \
|
"${DIRSRV_CERTS_DIR}/$host" \
|
||||||
"${ROOT_CA_DIR}/cert.pem" \
|
"${ROOT_CA_DIR}/cert.pem" \
|
||||||
"${ROOT_CA_DIR}/private.key"
|
"${ROOT_CA_DIR}/private.key"
|
||||||
@@ -103,7 +103,7 @@ function generate_ipa_pkcs12_certificates {
|
|||||||
if [ ! -f "${HTTPD_CERTS_DIR}/$host/cert.pem" ]; then
|
if [ ! -f "${HTTPD_CERTS_DIR}/$host/cert.pem" ]; then
|
||||||
generate_ipa_pkcs12_certificate \
|
generate_ipa_pkcs12_certificate \
|
||||||
"httpd-cert" \
|
"httpd-cert" \
|
||||||
$host \
|
"$host" \
|
||||||
"${HTTPD_CERTS_DIR}/$host" \
|
"${HTTPD_CERTS_DIR}/$host" \
|
||||||
"${ROOT_CA_DIR}/cert.pem" \
|
"${ROOT_CA_DIR}/cert.pem" \
|
||||||
"${ROOT_CA_DIR}/private.key"
|
"${ROOT_CA_DIR}/private.key"
|
||||||
@@ -115,7 +115,7 @@ function generate_ipa_pkcs12_certificates {
|
|||||||
|
|
||||||
generate_ipa_pkcs12_certificate \
|
generate_ipa_pkcs12_certificate \
|
||||||
"pkinit-cert" \
|
"pkinit-cert" \
|
||||||
$host \
|
"$host" \
|
||||||
"${PKINIT_CERTS_DIR}/$host" \
|
"${PKINIT_CERTS_DIR}/$host" \
|
||||||
"${ROOT_CA_DIR}/cert.pem" \
|
"${ROOT_CA_DIR}/cert.pem" \
|
||||||
"${ROOT_CA_DIR}/private.key" \
|
"${ROOT_CA_DIR}/private.key" \
|
||||||
@@ -135,17 +135,17 @@ function delete_ipa_pkcs12_certificates {
|
|||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f certificates/*/$host/*
|
rm -f certificates/*/"$host"/*
|
||||||
rm -f ${ROOT_CA_DIR}/*
|
rm -f "${ROOT_CA_DIR}"/*
|
||||||
}
|
}
|
||||||
|
|
||||||
# Entrypoint
|
# Entrypoint
|
||||||
case "$1" in
|
case "$1" in
|
||||||
create)
|
create)
|
||||||
generate_ipa_pkcs12_certificates $2 $3
|
generate_ipa_pkcs12_certificates "$2" "$3"
|
||||||
;;
|
;;
|
||||||
delete)
|
delete)
|
||||||
delete_ipa_pkcs12_certificates $2
|
delete_ipa_pkcs12_certificates "$2"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo $"Usage: $0 {create|delete}"
|
echo $"Usage: $0 {create|delete}"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: Playbook to with invalid IP’s in allow_transfer.
|
- name: Playbook to with invalid IPs in allow_transfer.
|
||||||
hosts: ipaserver
|
hosts: ipaserver
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ class TestDNSZone(AnsibleFreeIPATestCase):
|
|||||||
self.check_notexists([error], "dnszone-show", [add_zone])
|
self.check_notexists([error], "dnszone-show", [add_zone])
|
||||||
|
|
||||||
def test_dnszone_invalid_ip(self):
|
def test_dnszone_invalid_ip(self):
|
||||||
"""TC-07: Update with invalid IP’s in allow_transfer. Bug#1845051."""
|
"""TC-07: Update with invalid IPs in allow_transfer. Bug#1845051."""
|
||||||
invalid_zone_name = "invalidzone.test"
|
invalid_zone_name = "invalidzone.test"
|
||||||
invalid_zone_ip = "in.va.li.d"
|
invalid_zone_ip = "in.va.li.d"
|
||||||
expected_error = "Invalid IP for DNS forwarder"
|
expected_error = "Invalid IP for DNS forwarder"
|
||||||
|
|||||||
@@ -4,24 +4,26 @@ NUM=${1-1000}
|
|||||||
FILE="users.json"
|
FILE="users.json"
|
||||||
date=$(date --date='+2 years' "+%Y-%m-%d %H:%M:%S")
|
date=$(date --date='+2 years' "+%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
echo "{" > $FILE
|
echo "{" > "$FILE"
|
||||||
|
|
||||||
echo " \"users\": [" >> $FILE
|
echo " \"users\": [" >> "$FILE"
|
||||||
|
|
||||||
for i in $(seq 1 $NUM); do
|
for i in $(seq 1 "$NUM"); do
|
||||||
echo " {" >> $FILE
|
{
|
||||||
echo " \"name\": \"user$i\"," >> $FILE
|
echo " {"
|
||||||
echo " \"first\": \"First $i\"," >> $FILE
|
echo " \"name\": \"user$i\","
|
||||||
echo " \"last\": \"Last $i\"," >> $FILE
|
echo " \"first\": \"First $i\","
|
||||||
echo " \"password\": \"user${i}PW\"," >> $FILE
|
echo " \"last\": \"Last $i\","
|
||||||
echo " \"passwordexpiration\": \"$date\"" >> $FILE
|
echo " \"password\": \"user${i}PW\","
|
||||||
if [ $i -lt $NUM ]; then
|
echo " \"passwordexpiration\": \"$date\""
|
||||||
echo " }," >> $FILE
|
} >> "$FILE"
|
||||||
|
if [ "$i" -lt "$NUM" ]; then
|
||||||
|
echo " }," >> "$FILE"
|
||||||
else
|
else
|
||||||
echo " }" >> $FILE
|
echo " }" >> "$FILE"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo " ]" >> $FILE
|
echo " ]" >> "$FILE"
|
||||||
|
|
||||||
echo "}" >> $FILE
|
echo "}" >> "$FILE"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user