Explorar o código

Rolle reboot: bc aus shell-Kommando entfernt

erdo %!s(int64=7) %!d(string=hai) anos
pai
achega
ea6b6f62ec
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      roles/reboot/tasks/main.yml

+ 1 - 1
roles/reboot/tasks/main.yml

@@ -1,6 +1,6 @@
 ---
 - name: get uptime in min
-  shell: "echo $(awk '{print $1}' /proc/uptime) / 60 | bc"
+  shell: "awk '{printf "%0.f", $0/60}' /proc/uptime"
   register: uptime
   
 - name: Reboot server