Explorar o código

centos and debian update playbooks

Douglas Andreani %!s(int64=5) %!d(string=hai) anos
achega
39e881b1f5
Modificáronse 2 ficheiros con 32 adicións e 0 borrados
  1. 14 0
      centos_update.yml
  2. 18 0
      debian_update.yml

+ 14 - 0
centos_update.yml

@@ -0,0 +1,14 @@
+---
+- hosts: omega
+  become_user: root
+  become: yes
+  tasks:
+    - name: update the system
+      yum:
+        name: "*"
+        state: latest
+    - name: start cockpit
+      service:
+        name: cockpit
+        state: started
+

+ 18 - 0
debian_update.yml

@@ -0,0 +1,18 @@
+---
+- hosts: debian
+  become_user: root
+  become: yes
+  tasks:
+    - name: update the system
+      apt:
+        upgrade: dist
+        update_cache: yes
+
+    - name: Remove useless packages from the cache
+      apt:
+        autoclean: yes
+
+    - name: Remove dependencies that are no longer required
+      apt:
+        autoremove: yes
+