Skip to content

Commit

Permalink
Try to modify /etc/hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeffman committed Feb 13, 2025
1 parent e6ec81e commit c00e7fa
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/tasks/setup_ipa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,23 @@
ternary('ansible.posix.rhel_rpm_ostree', omit) }}"
when: ansible_facts.os_family == "RedHat"

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

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

- name: Run IPA server install
vars:
ipaserver_setup_dns: false
Expand Down

0 comments on commit c00e7fa

Please sign in to comment.