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 ?

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

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

Your help will be appreciated.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.