diff --git a/states/tests/custom.sls b/states/tests/custom.sls new file mode 100644 index 0000000..692ff28 --- /dev/null +++ b/states/tests/custom.sls @@ -0,0 +1,6 @@ +--- +human_friendly_state_id: + custom.enforce_custom_thing: + - name: Nom + - foo: Valeur + - bar: false diff --git a/states/tests/file.sls b/states/tests/file.sls new file mode 100644 index 0000000..2310375 --- /dev/null +++ b/states/tests/file.sls @@ -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 diff --git a/states/tests/mine_test.sls b/states/tests/mine_test.sls new file mode 100644 index 0000000..88bd982 --- /dev/null +++ b/states/tests/mine_test.sls @@ -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 }}