0

I am working on Salt related stuffs, here I found lens inside the augeas module.I have been looked into the saltStack documentation but I could not able to figure out what it actually does ?

augeas.change:
    - context: /files/etc/redis/redis.conf
    - lens: redis.lns
    - changes:
       - set bind 0.0.0.0
       - set maxmemory 1G

Here in above rule my understanding is look for the file redis.conf and set the bind parameter to 0.0.0.0. But my question is what lens: redis.lns will do here ?

Your help will be appreciated.

Thomas
  • 6,242
  • 8
  • 26
  • 32
Abdulvakaf K
  • 181
  • 1
  • 7

1 Answers1

0

Augeas is a C library which parses configuration files and exposes them as a tree with an API to query and modify it.

Lenses are the bi-directional parsers Augeas uses for these tranformations. Each format supported by Augeas corresponds to a specific lens.

This video explains the principle of lenses easily.

raphink
  • 289
  • 1
  • 8