Skip to content

Commit

Permalink
Quick reproduction of saltstack/salt#36796
Browse files Browse the repository at this point in the history
  • Loading branch information
Mickaël FALCK committed Feb 2, 2018
1 parent 9c65313 commit e422fc8
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Saltfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
salt-ssh:
roster_file: ./conf/roster
config_dir: ./conf
ssh_log_file: ./logs/salt-ssh-log.log
ssh_priv: agent-forwarding
14 changes: 14 additions & 0 deletions conf/master
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pki_dir: "/home/mfalck/Work/salt_replicate/.pki"

cachedir: "/home/mfalck/Work/salt_replicate/.cache"

fileserver_backend:
- roots

file_roots:
base:
- /home/mfalck/Work/salt_replicate/salt/

pillar_roots:
base:
- /home/mfalck/Work/salt_replicate/pillar/
4 changes: 4 additions & 0 deletions conf/roster
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
salt-master:
host: 172.28.123.100
user: vagrant
sudo: True
1 change: 0 additions & 1 deletion gistfile1.txt

This file was deleted.

2 changes: 2 additions & 0 deletions pillar/base.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mine_functions:
network.ip_addrs: []
3 changes: 3 additions & 0 deletions pillar/top.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
base:
'*':
- base
3 changes: 3 additions & 0 deletions salt/test_get.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{ salt['grains.get']('os') }}-dummy:
cmd.run:
- name: "uname -a"
7 changes: 7 additions & 0 deletions salt/test_mine.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{%- set mine_ips = salt['mine.get']('*', 'network.ip_addrs') %}

{%- for host, ip_addrs in mine_ips.items() %}
{{ host }}-dummy:
cmd.run:
- name: "ip route get {{ ip_addrs|first }}"
{%- endfor %}
4 changes: 4 additions & 0 deletions salt/top.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
base:
'*':
- test_mine
- test_get

0 comments on commit e422fc8

Please sign in to comment.