Skip to content
Snippets Groups Projects
Select Git revision
  • 3562d3378b81c815cfebd3e871d411310ed73065
  • master default protected
  • v2.27.1
  • v2.28.0
  • v2.27.0
  • v2.25.1
  • v2.24.3
  • v2.26.0
  • v2.24.2
  • v2.25.0
  • v2.24.1
  • v2.22.2
  • v2.23.3
  • v2.24.0
  • v2.23.2
  • v2.23.1
  • v2.23.0
  • v2.22.1
  • v2.22.0
  • v2.21.0
  • v2.20.0
  • v2.19.1
22 results

generate-inventory.sh

Blame
  • test_user_client_context.yml 1.17 KiB
    ---
    - name: Test user
      hosts: ipaclients, ipaserver
      become: no
      gather_facts: no
    
      tasks:
      - name: Include FreeIPA facts.
        include_tasks: ../env_freeipa_facts.yml
    
      # Test will only be executed if host is not a server.
      - name: Execute with server context in the client.
        ipauser:
          ipaadmin_password: SomeADMINpassword
          ipaapi_context: server
          name: ThisShouldNotWork
        register: result
        failed_when: not (result.failed and result.msg is regex("No module named '*ipaserver'*"))
        when: ipa_host_is_client
    
    # Import basic module tests, and execute with ipa_context set to 'client'.
    # If ipaclients is set, it will be executed using the client, if not,
    # ipaserver will be used.
    #
    # With this setup, tests can be executed against an IPA client, against
    # an IPA server using "client" context, and ensure that tests are executed
    # in upstream CI.
    
    - name: Test user using client context, in client host.
      import_playbook: test_user.yml
      when: groups['ipaclients']
      vars:
        ipa_test_host: ipaclients
    
    - name: Test user using client context, in server host.
      import_playbook: test_user.yml
      when: groups['ipaclients'] is not defined or not groups['ipaclients']