• Home
  • Ansible
  • About
  • Index
My Daily Tutorials

replace

  • Ansible

Replacing Strings and Lines in Ansible

Posted on February 5, 2018April 27, 2018by Ansible admin

There are multiple ways in which you can replace a particular word, a line, all the words matching a specific pattern etc. in Ansible. Depending on the situation we can use the Ansible ‘replace’ module or ‘lineinfile’ module. In this post, we will see some examples of how to use these modules to get the desired […]

Read More
1 Comment
  • Ansible

How to add lines to a file in Ansible

Posted on November 2, 2017April 27, 2018by Ansible admin

Depending on your requirements, you might need to add a line to a file in different positions. Start of the file. End of the file. After a line/pattern. Before a line/pattern. Append a string to a line (before/after). Also, there might be other conditions you need to satisfy like, Add multiple lines. Add command line […]

Read More

Mydailytutorials.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.

Recent Posts

  • How to create files in Ansible
  • Replacing Strings and Lines in Ansible
  • Working with Ansible yum module
  • Ansible Pip Module – Managing Python Packages
  • Working with Environment​ Variables in Ansible

Categories

  • Ansible
  • Linux
  • Tutorials
Mydailytutorials.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com. Theme by Colorlib Powered by WordPress