Student User 2 éve
szülő
commit
dc46465157

+ 2 - 3
T4/guided/stat-play/lineinfile.yml → T4/guided/stat-play/lineinfile1.yml

@@ -1,12 +1,11 @@
 ---
 
-- name: play1
+- name: escribe una linea en un fichero 
   hosts: servera.lab.example.com
   tasks:
     - name: line in file
       lineinfile:
         path: /tmp/text.txt
-        line: "Esto es una prueba"
-        rege
+        line: "Esto es otra prueba"
         state: present
         create: yes

+ 12 - 0
T4/guided/stat-play/lineinfile2.yml

@@ -0,0 +1,12 @@
+---
+
+- name: reemplaza una linea
+  hosts: servera.lab.example.com
+  tasks:
+    - name: line in file
+      lineinfile:
+        path: /tmp/text.txt
+        line: "Esto es otra prueba"
+        regexp: '^Esto'
+        state: present
+        create: yes