install_ipa_server.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ---
  15. - name: Install ipa server in CentOS > 8 or Rocky 8.4
  16. command: >-
  17. ipa-server-install -n '{{ domain_name }}' --hostname='{{ server_hostname_ms }}' -a '{{ ipa_admin_password }}'
  18. -p '{{ directory_manager_password }}' -r '{{ realm_name }}' --setup-dns --no-forwarders --no-reverse --no-ntp -U
  19. changed_when: true
  20. no_log: true
  21. when:
  22. - ( os_supported_centos in mgmt_os ) or
  23. ( os_supported_rocky in mgmt_os )
  24. - name: Authenticate as admin
  25. shell: set -o pipefail && echo $'{{ ipa_admin_password }}' | kinit {{ ipa_admin_username }}
  26. no_log: true
  27. changed_when: false
  28. - name: Replace the /etc/resolv.conf file
  29. copy:
  30. src: "{{ temp_resolv_conf_path }}"
  31. dest: "{{ resolv_conf_path }}"
  32. mode: "{{ file_mode }}"
  33. remote_src: yes