Skip to content

Comments

updating /etc/hosts entries#3971

Merged
jagadeeshnv merged 3 commits intodell:pub/q1_devfrom
Nagachandan-P:pub/q1_dev
Feb 13, 2026
Merged

updating /etc/hosts entries#3971
jagadeeshnv merged 3 commits intodell:pub/q1_devfrom
Nagachandan-P:pub/q1_dev

Conversation

@Nagachandan-P
Copy link
Contributor

if we update the pxe file entry it would be repeating the same ip for different hostnames, so fixed it in this PR.

- name: Remove stale entries for IPs that are being updated
ansible.builtin.shell: |
set -o pipefail
grep -v '^{{ item.value.ADMIN_IP }}\s' {{ hosts_file_path }} > {{ hosts_file_path }}.tmp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it handling cases where the duplicate hostname is there? with a different IP?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@jagadeeshnv jagadeeshnv merged commit 4a07ea4 into dell:pub/q1_dev Feb 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants