Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

ansible remove part of line

# Use replace module to delete root ssh limitations.
# Here, we are deleting ('') the matching regex text in a line.

- name: Allow root access
  replace:
    path: ~/.ssh/authorized_keys
    regexp: '^no.*10".'
    replace: ''
Source by www.linuxtechi.com #
 
PREVIOUS NEXT
Tagged: #ansible #remove #part #line
ADD COMMENT
Topic
Name
4+4 =