Skip to content

Commit

Permalink
TEMP: Quick test for upstream checks
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Guterres Jeffman <[email protected]>
  • Loading branch information
rjeffman committed Feb 7, 2025
1 parent 765123b commit 508771b
Showing 1 changed file with 43 additions and 33 deletions.
76 changes: 43 additions & 33 deletions tests/tasks/setup_ipa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,43 @@
set_fact:
__certificate_is_ostree: "{{ __ostree_booted_stat.stat.exists }}"

- name: Install ansible-freeipa
package:
name: ansible-freeipa
delegate_to: 127.0.0.1
when: __is_beaker_env

- name: Ensure freeipa-repo is absent
file:
path: /tmp/freeipa-repo/
state: absent
delegate_to: 127.0.0.1
become: false
when: not __is_beaker_env

- name: Clone ansible-freeipa repo
git: # noqa latest[git]
repo: https://github.com/freeipa/ansible-freeipa
dest: /tmp/freeipa-repo
depth: 1
delegate_to: 127.0.0.1
become: false
when: not __is_beaker_env
# - name: Install ansible-freeipa
# package:
# name: ansible-freeipa
# delegate_to: 127.0.0.1
# when: __is_beaker_env
#
# - name: Ensure freeipa-repo is absent
# file:
# path: /tmp/freeipa-repo/
# state: absent
# delegate_to: 127.0.0.1
# become: false
# when: not __is_beaker_env
#
# - name: Clone ansible-freeipa repo
# git: # noqa latest[git]
# repo: https://github.com/freeipa/ansible-freeipa
# dest: /tmp/freeipa-repo
# depth: 1
# delegate_to: 127.0.0.1
# become: false
# when: not __is_beaker_env
#
# - name: Create role symlinks
# file:
# src: "/tmp/freeipa-repo/roles/{{ item }}/"
# dest: "{{ playbook_dir }}/roles/{{ item }}"
# state: link
# delegate_to: 127.0.0.1
# become: false
# loop:
# - ipaserver
# - ipaclient
# when: not __is_beaker_env

- name: Create role symlinks
file:
src: "/tmp/freeipa-repo/roles/{{ item }}/"
dest: "{{ playbook_dir }}/roles/{{ item }}"
state: link
delegate_to: 127.0.0.1
become: false
loop:
- ipaserver
- ipaclient
when: not __is_beaker_env
- name: Intall ansible-freeipa collection
ansible.builtin.shell: ansible-galaxy collection install freeipa.ansible_freeipa

- name: Ensure hostname package is installed
package:
Expand Down Expand Up @@ -80,6 +83,7 @@
ipadm_password: SomeDMpassword
ipaserver_domain: test.local
ipaserver_realm: TEST.LOCAL
ipaserver_hostname: ipaserver.test.local
ipaserver_no_host_dns: true
local_log_dir: "{{ lookup('env', 'TEST_ARTIFACTS') | d('/tmp', true) }}"
role_collection_path: >-
Expand Down Expand Up @@ -118,7 +122,13 @@
$( [[ -e ipaclient-install.log ]] && echo ipaclient-install.log ) \
$( [[ -e pki ]] && echo pki )
chmod '0644' /tmp/ipalogs.tgz
echo "==========================="
echo " ipaserver-install.log"
echo "==========================="
cat ipaserver-install.log
echo "==========================="
echo " /var/log/messages"
echo "==========================="
cat /var/log/messages
changed_when: false
- name: FAILURE - grab archive
Expand Down

0 comments on commit 508771b

Please sign in to comment.