From 7fe6d14f6b4d5569e90cd951c566b6507847c1f5 Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Wed, 1 Mar 2023 15:09:26 +0000 Subject: [PATCH] Change fix-networking.yml so it doesn't overwrite all of /etc/hosts --- etc/kayobe/ansible/fix-networking.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/etc/kayobe/ansible/fix-networking.yml b/etc/kayobe/ansible/fix-networking.yml index f24be3862..0a1736702 100644 --- a/etc/kayobe/ansible/fix-networking.yml +++ b/etc/kayobe/ansible/fix-networking.yml @@ -11,11 +11,10 @@ ansible_ssh_common_args: "-o StrictHostKeyChecking=no" tasks: - name: Ensure `hosts` file contains pulp entries - ansible.builtin.copy: - content: | - 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 - ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 + blockinfile: + path: /etc/hosts + marker_begin: BEGIN Kayobe Pulp entries + block: | 10.0.0.34 pelican pelican.service.compute.sms-lab.cloud 10.205.3.187 pulp-server pulp-server.internal.sms-cloud - dest: /etc/hosts become: true