This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# under my own state, 'vsftpd-users.indoor' #} | |
{% from "vsftpd/map.jinja" import vsftpd with context %} | |
{% from "users/map.jinja" import users with context %} | |
{% for name, user in pillar.get('users', {}).items() if user.absent is not defined or not user.absent %} | |
{% if 'ftpuser' in user %} | |
{{ name }}_vsftpd_user_export: | |
file.append: | |
- name: /root/ftp_user_list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ time sudo salt-call pillar.items | |
local: | |
---------- | |
_errors: | |
- Specified SLS 'stack/first-try' in environment 'base' is not available on the salt master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
One pillar already exists: | |
users: | |
bob: | |
home: /some/odd/place/bob | |
setting_foo: blah | |
setting_bar: 42 | |
password: [hash] | |
another is input, where some elements are present: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i have: | |
users: | |
joe: | |
thing: | |
- foo | |
- bar | |
bob: | |
thing: | |
- baz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bind_local_config: | |
file.managed: | |
- name: {{ map.local_config }} | |
- source: 'salt://{{ map.config_source_dir }}/named.conf.local' | |
- template: jinja | |
- user: {{ salt['pillar.get']('bind:config:user', map.user) }} | |
- group: {{ salt['pillar.get']('bind:config:group', map.group) }} | |
- mode: {{ salt['pillar.get']('bind:config:mode', '644') }} | |
- context: | |
map: {{ map }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ssh evil | |
The authenticity of host 'evil (192.168.50.39)' can't be established. | |
ECDSA key fingerprint is 36:e8:c5:97:ca:88:65:69:c2:f6:30:3d:b0:f3:1b:bc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
animate-dump-symlink: | |
file.symlink: | |
- name: /opt/animate/scripts/db-dump.sh | |
- target: | |
{% if grains['nodename'] == 'anistage-db01' %} | |
{% set target = '/opt/PRLSS/scripts/animate-mysql-dbms-dump.sh.2' %} | |
{% else %} | |
{% set target = '/opt/PRLSS/scripts/animate-mysql-dbms-dump.sh' %} | |
{% endif %} | |
- makedirs: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config_my_site: | |
file.managed: | |
- name: /etc/apache2/sites-available/my-site-8181 | |
- template: jinja | |
- source: salt://animate-web-2/templates/my-site-8181-virtual.tmpl | |
[ something else must go here ] | |
- watch_in: | |
- service: apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for name in {{ pillar['damnjava']['apps'] }} %} | |
java_app_{{ name }}: | |
file.symlink: | |
- name: /etc/alternatives/{{ name }} | |
- target: /opt/software/java/bin/{{ name }} | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cribbing, I thought, from: | |
https://docs.saltstack.com/en/latest/topics/tutorials/states_pt4.html#salt-fileserver-path-inheritance | |
...and also, | |
[other page where (I thought) it describes d/q/p] | |
>>> In /etc/salt/master: | |
file_roots: | |
base: | |
- /srv/salt/prod |
NewerOlder