|
@@ -1,4 +1,4 @@
|
|
|
-# Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
|
|
|
+# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
|
|
|
#
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
# you may not use this file except in compliance with the License.
|
|
@@ -42,9 +42,14 @@
|
|
|
file:
|
|
|
path: "{{ role_path}}/files"
|
|
|
state: directory
|
|
|
-
|
|
|
+
|
|
|
+- name: Fetch cobbler pod name
|
|
|
+ command: kubectl get pods -n cobbler -o jsonpath="{.items[0].metadata.name}"
|
|
|
+ register: cobbler_pod
|
|
|
+ changed_when: false
|
|
|
+
|
|
|
- name: Copy dhcpd.leases from cobbler
|
|
|
- command: docker cp cobbler:/var/lib/dhcpd/dhcpd.leases {{ role_path}}/files/dhcpd.leases
|
|
|
+ command: kubectl cp {{ cobbler_pod.stdout }}:/var/lib/dhcpd/dhcpd.leases {{ role_path}}/files/dhcpd.leases -n cobbler
|
|
|
changed_when: true
|
|
|
|
|
|
- name: Fetch ethernet details of unreachable hosts
|
|
@@ -88,4 +93,4 @@
|
|
|
|
|
|
- name: Display provision host report
|
|
|
debug:
|
|
|
- var: host_report.stdout_lines
|
|
|
+ var: host_report.stdout_lines
|