Skip to content
Snippets Groups Projects
Select Git revision
  • a26e38c88000373f24737b1ddb51588c35bdac7e
  • master default protected
  • v1.15.1
  • v1.15.0
  • v1.14.7
  • v1.14.6
  • v1.14.5
  • v1.14.4
  • v1.14.3
  • v1.14.2
  • v1.14.1
  • v1.14.0
  • v1.13.2
  • v1.13.1
  • v1.13.0
  • v1.12.1
  • v1.12.0
  • v1.11.1
  • v1.11.0
  • v1.10.0
  • v1.9.2
  • v1.9.1
22 results

README-server.md

Blame
  • user avatar
    Thomas Woerner authored
    There is a new server management module placed in the plugins folder:
    
        plugins/modules/ipaserver.py
    
    The server module allows to ensure presence and absence of servers. The
    module requires an existing server, the deployment of a new server can
    not be done with the module.
    
    DNSName has been added to ansible_freeipa_module in plugins/module_utils
    as this is used for locations.
    
    Here is the documentation for the module:
    
        README-server.md
    
    New example playbooks have been added:
    
        playbooks/server/server-absent-continue.yml
        playbooks/server/server-absent-force.yml
        playbooks/server/server-absent-ignore_last_of_role.yml
        playbooks/server/server-absent-ignore_topology_disconnect.yml
        playbooks/server/server-absent.yml
        playbooks/server/server-hidden.yml
        playbooks/server/server-location.yml
        playbooks/server/server-no-location.yml
        playbooks/server/server-no-service-weight.yml
        playbooks/server/server-not-hidden.yml
        playbooks/server/server-present.yml
        playbooks/server/server-service-weight.yml
    
    New tests for the module:
    
        tests/server/test_server.yml
    
    Change in module_utils/ansible_freeipa_module:
    
        DNSName is imported from ipapython.dnsutil and also added to __all__
    16795b8b
    History

    Server module

    Description

    The server module allows to ensure presence and absence of servers. The module requires an existing server, the deployment of a new server can not be done with the module.

    Features

    • Server management

    Supported FreeIPA Versions

    FreeIPA versions 4.4.0 and up are supported by the ipaserver module.

    Requirements

    Controller

    • Ansible version: 2.8+

    Node

    • Supported FreeIPA version (see above)

    Usage

    Example inventory file

    [ipaserver]
    ipaserver.test.local

    Example playbook to make sure server "server.example.com" is present:

    ---
    - name: Playbook to manage IPA server.
      hosts: ipaserver
      become: yes
    
      tasks:
      - ipaserver:
          ipaadmin_password: SomeADMINpassword
          name: server.example.com

    Example playbook to make sure server "server.example.com" is present with location mylocation:

    ---
    - name: Playbook to manage IPA server.
      hosts: ipaserver
      become: yes
    
      tasks:
      - ipaserver:
          ipaadmin_password: SomeADMINpassword
          name: server.example.com
          location: mylocation

    Example playbook to make sure server "server.example.com" is present without a location:

    ---
    - name: Playbook to manage IPA server.
      hosts: ipaserver
      become: yes
    
      tasks:
      - ipaserver:
          ipaadmin_password: SomeADMINpassword
          name: server.example.com
          location: ""

    Example playbook to make sure server "server.example.com" is present with service weight 1:

    ---
    - name: Playbook to manage IPA server.
      hosts: ipaserver
      become: yes
    
      tasks:
      - ipaserver:
          ipaadmin_password: SomeADMINpassword
          name: server.example.com
          service_weight: 1

    Example playbook to make sure server "server.example.com" is present without service weight:

    ---
    - name: Playbook to manage IPA server.
      hosts: ipaserver
      become: yes
    
      tasks:
      - ipaserver:
          ipaadmin_password: SomeADMINpassword
          name: server.example.com
          service_weight: -1

    Example playbook to make sure server "server.example.com" is present and hidden:

    ---
    - name: Playbook to manage IPA server.
      hosts: ipaserver
      become: yes
    
      tasks:
      - ipaserver:
          ipaadmin_password: SomeADMINpassword
          name: server.example.com
          hidden: yes

    Example playbook to make sure server "server.example.com" is present and not hidden:

    ---
    - name: Playbook to manage IPA server.
      hosts: ipaserver
      become: yes
    
      tasks:
      - ipaserver:
          ipaadmin_password: SomeADMINpassword
          name: server.example.com
          hidden: no

    Example playbook to make sure server "server.example.com" is absent:

    ---
    - name: Playbook to manage IPA server.
      hosts: ipaserver
      become: yes
    
      tasks:
      - ipaserver:
          ipaadmin_password: SomeADMINpassword
          name: server.example.com
          state: absent

    Example playbook to make sure server "server.example.com" is absent in continuous mode in error case:

    ---
    - name: Playbook to manage IPA server.
      hosts: ipaserver
      become: yes
    
      tasks:
      - ipaserver:
          ipaadmin_password: SomeADMINpassword
          name: server.example.com
          continue: yes
          state: absent

    Example playbook to make sure server "server.example.com" is absent with last of role check skip:

    ---
    - name: Playbook to manage IPA server.
      hosts: ipaserver
      become: yes
    
      tasks:
      - ipaserver:
          ipaadmin_password: SomeADMINpassword
          name: server.example.com
          ignore_last_of_role: yes
          state: absent

    Example playbook to make sure server "server.example.com" is absent iwith topology disconnect check skip:

    ---
    - name: Playbook to manage IPA server.
      hosts: ipaserver
      become: yes
    
      tasks:
      - ipaserver:
          ipaadmin_password: SomeADMINpassword
          name: server.example.com
          ignore_topology_disconnect: yes
          state: absent

    MORE EXAMPLE PLAYBOOKS HERE

    Variables

    ipaserver

    Variable Description Required
    ipaadmin_principal The admin principal is a string and defaults to admin no
    ipaadmin_password The admin password is a string and is required if there is no admin ticket available on the node no
    name | cn The list of server name strings. yes
    location | ipalocation_location The server location string. Only in state: present. "" for location reset. no
    service_weight | ipaserviceweight Weight for server services. Type Values 0 to 65535, -1 for weight reset. Only in state: present. (int) no
    hidden Set hidden state of a server. Only in state: present. (bool) no
    no_members Suppress processing of membership attributes. Only in state: present. (bool) no
    delete_continue | continue Continuous mode: Don't stop on errors. Only in state: absent. (bool) no
    ignore_last_of_role Skip a check whether the last CA master or DNS server is removed. Only in state: absent. (bool) no
    ignore_topology_disconnect Ignore topology connectivity problems after removal. Only in state: absent. (bool) no
    force Force server removal even if it does not exist. Will always result in changed. Only in state: absent. (bool) no
    state The state to ensure. It can be one of present, absent, default: present. present is only working with existing servers. no

    Authors

    Thomas Woerner