Skip to content

Commit

Permalink
add path
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeffman committed Feb 13, 2025
1 parent c00e7fa commit 3673814
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions tests/tasks/setup_ipa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,25 @@

- name: Sanitize /etc/hosts
ansible.builtin.lineinfile:
path: /etc/hosts
regexp: "{{ ansible_default_ipv4.address }}"
state: absent
owner: root
group: root
mode: "0644"
when: not __is_beaker_env
become: true

- name: Add host to /etc/hosts
ansible.builtin.lineinfile:
dest: /etc/hosts
path: /etc/hosts
line: "{{ ansible_default_ipv4.address }} {{ ipaserver.test.local }}"
state: present
insertafter: EOF
create: True
owner: root
group: root
mode: "0644"
when: not __is_beaker_env
become: true

Expand All @@ -110,19 +117,16 @@
/usr/bin/env -u LINUXSYSTEMROLES_SSH_KEY
delegate_to: localhost

# - name: See if collection exists
# stat:
# path: "{{ role_collection_path }}"
# register: __ipa_collection
# delegate_to: localhost

# - name: Set name of ipa server role
# set_fact:
# __ipa_server_role: "{{ role_collection_name
# if __ipa_collection.stat.exists else 'ipaserver' }}"
- name: See if collection exists
stat:
path: "{{ role_collection_path }}"
register: __ipa_collection
delegate_to: localhost

- set_fact:
__ipa_server_role: "ipaserver"
- name: Set name of ipa server role
set_fact:
__ipa_server_role: "{{ role_collection_name
if __ipa_collection.stat.exists else 'ipaserver' }}"

- name: Include ipaserver role
include_role:
Expand Down

0 comments on commit 3673814

Please sign in to comment.