From d8ac5c749601be1ab3bca06d929f988bf996cace Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Wed, 1 Mar 2023 15:09:26 +0000 Subject: [PATCH 1/2] 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 From 79bfa3b7bba46052272149703890c9fb70f8b8ce Mon Sep 17 00:00:00 2001 From: Matt Crees Date: Wed, 1 Mar 2023 16:23:55 +0000 Subject: [PATCH 2/2] Correct marker --- etc/kayobe/ansible/fix-networking.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/kayobe/ansible/fix-networking.yml b/etc/kayobe/ansible/fix-networking.yml index 0a1736702..c992be181 100644 --- a/etc/kayobe/ansible/fix-networking.yml +++ b/etc/kayobe/ansible/fix-networking.yml @@ -13,7 +13,7 @@ - name: Ensure `hosts` file contains pulp entries blockinfile: path: /etc/hosts - marker_begin: BEGIN Kayobe Pulp entries + marker: "# {mark} 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