salt

SaltStack: Keeping Salt Pillar data encrypted using GPG

When automating software and infrastructure, it is not uncommon to need to supply a user id and password for installation or other operations.  While it is certainly possible to pass these plaintext credentials directly in the state, this is not best practice. # not best practice!!! testdb_user: mysql_user.present: – name: frank – password: “test3rdb” – SaltStack: Keeping Salt Pillar data encrypted using GPG

SaltStack: Setting a jinja2 variable from an inner block scope

When using jinja2 for SaltStack formulas you may be surprised to find that your global scoped variables do not have ability to be modified inside a loop.  Although this is counter intuitive given the scope behavior of most scripting languages it is unfortunately the case that a jinja2 globally scoped variable cannot be modified from SaltStack: Setting a jinja2 variable from an inner block scope