lineinfile2.yml 249 B

123456789101112
  1. ---
  2. - name: reemplaza una linea
  3. hosts: servera.lab.example.com
  4. tasks:
  5. - name: line in file
  6. lineinfile:
  7. path: /tmp/text.txt
  8. line: "Esto es otra prueba"
  9. regexp: '^Esto'
  10. state: present
  11. create: yes