added tests state
This commit is contained in:
parent
1f8fdeb8bb
commit
b01f06564f
6
states/tests/custom.sls
Normal file
6
states/tests/custom.sls
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
human_friendly_state_id:
|
||||
custom.enforce_custom_thing:
|
||||
- name: Nom
|
||||
- foo: Valeur
|
||||
- bar: false
|
17
states/tests/file.sls
Normal file
17
states/tests/file.sls
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
#/tmp/postgresql.conf:
|
||||
# file.keyvalue:
|
||||
# - key_values:
|
||||
# listen_addresses: "'localhost'"
|
||||
# include: "'test'"
|
||||
# - separator: ' = '
|
||||
# - uncomment: '# '
|
||||
# - key_ignore_case: True
|
||||
# - append_if_not_found: True
|
||||
|
||||
/etc/default/grub:
|
||||
file.line:
|
||||
- content: GRUB_CMDLINE_LINUX="texr"
|
||||
- match: "^GRUB_CMDLINE_LINUX="
|
||||
- mode: ensure
|
||||
- location: end
|
19
states/tests/mine_test.sls
Normal file
19
states/tests/mine_test.sls
Normal file
@ -0,0 +1,19 @@
|
||||
{% set minion_ips = salt['mine.get'](
|
||||
tgt='G@lb:true',
|
||||
fun='internal_ip_addrs',
|
||||
tgt_type='compound') %}
|
||||
|
||||
#pkg-repo-test-absent:
|
||||
# pkgrepo.absent:
|
||||
# - name: deb http://repository.spotify.com stable non-free
|
||||
|
||||
{% set a = [] %}
|
||||
{%- for k,v in minion_ips.items() %}
|
||||
{%- if k != salt['grains.get']('fqdn') %}
|
||||
{%- for i in v %}
|
||||
{% set _ = a.append(i) %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{{ a|sort|unique }}
|
Loading…
Reference in New Issue
Block a user