Explorar el Código

casa 23/02/23

pulitux hace 2 años
padre
commit
ff9276caa8
Se han modificado 7 ficheros con 24 adiciones y 5 borrados
  1. 1 1
      netlink-review/inventory
  2. 2 4
      netlink-review/playbook.yml
  3. BIN
      ping/.ping.yml.swp
  4. 3 0
      ping/ansible.cfg
  5. 1 0
      ping/inventory
  6. 12 0
      ping/ping.yml
  7. 5 0
      ping/playbook.yml

+ 1 - 1
netlink-review/inventory

@@ -1,2 +1,2 @@
 [servers]
-serverb.lab.example.com
+serverb #.lab.example.com

+ 2 - 4
netlink-review/playbook.yml

@@ -1,5 +1,3 @@
----
-
 - name: Configure team network device
   hosts: servers
   become: true
@@ -30,11 +28,11 @@
         master: team1
 
   roles:
-    - rhel-system-role
+    - rhel-system-roles.network
 
   tasks:
     - name: Tune team runner to activebackup
-      command: nmcli con nmcli con  
+      command: nmcli con mod team1 team.runner activebackup
 
     - name: Reboot the server
       reboot:

BIN
ping/.ping.yml.swp


+ 3 - 0
ping/ansible.cfg

@@ -0,0 +1,3 @@
+[defaults]
+remote_user = devops
+inventory = ./inventory

+ 1 - 0
ping/inventory

@@ -0,0 +1 @@
+servera

+ 12 - 0
ping/ping.yml

@@ -0,0 +1,12 @@
+- name: ping
+  ping:
+  register: retorno
+  ignore_unreachable: true
+
+- name: escupe reurn
+  debug:
+    var: retorno
+
+- name: recursivo
+  include_tasks: ping.yml
+  when: retorno.ping is undefined

+ 5 - 0
ping/playbook.yml

@@ -0,0 +1,5 @@
+- name: prueba ping
+  hosts: all
+  gather_facts: no
+  tasks:
+    - include_tasks: ping.yml