MENU

Catalog

    saltstack - jinja模板套用动态配置

    ## dns渲染例子
    cat /srv/salt/base/init/files/resolv.conf

    nameserver {{ DNS_SERVER }}
    

    cat /srv/salt/base/init/dns.sls

      file.managed:
        - source: salt://init/files/resolv.conf
        - user: root
        - group: root
        - mode: 644
        - template: jinja
        - defaults:
          DNS_SERVER: 223.5.5.5
    
    Tags: None
    Archives QR Code
    QR Code for this page
    Tipping QR Code
    Leave a Comment