Testing the saltstack grains variables

This commit is contained in:
Elijah Lazkani 2017-03-18 13:14:58 -04:00
parent d658484639
commit 73ea4d6629
3 changed files with 9 additions and 1 deletions

View file

@ -28,3 +28,4 @@ install:
script:
- sudo salt-call --local --config=./ --state-output=changes --log-level=quiet --retcode-passthrough state.apply
- cat $HOME/os_family

View file

@ -0,0 +1,2 @@
Kernel: {{ grains['kernel'] }}
OS_Family: {{ grains['os_family'] }}

View file

@ -1,5 +1,5 @@
neovim-install:
{% if grains['os'] == 'Ubuntu' %}
{% if grains['os_family'] == 'Debian' %}
pkgrepo.managed:
- ppa: neovim-ppa/unstable
{% endif %}
@ -11,3 +11,8 @@ neovim-install:
- name: neovim
{% endif %}
os-family:
file.managed:
- name: {{ grains.homedir }}/os_family
- source: salt:///neovim/files/os_fams