insert format declaration in salt files

This commit is contained in:
John Bowdre 2024-02-06 11:28:43 -06:00
parent c3f229ad89
commit fc50bd1884
12 changed files with 36 additions and 0 deletions

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
pkgs:
{% if grains['os_family'] == 'RedHat' %}
apache: httpd

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
base:
'*':
- users

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
users:
jake: 1001
jason: 1002

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
sync_grains:
local.saltutil.sync_grains:
- tgt: {{ data['id'] }}

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
base:
'*':
- vim

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
{% for user, uid in pillar.get('users', {}).items() %}
{{user}}:
user.present:

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
install_vim:
pkg.installed:
- name: {{ pillar['pkgs']['vim'] }}

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
uninstall_vim:
pkg.removed:
- name: {{ pillar['pkgs']['vim'] }}

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
install_apache:
pkg.installed:
- name: {{ pillar['pkgs']['apache'] }}

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
uninstall_apache:
pkg.removed:
- name: {{ pillar['pkgs']['apache'] }}

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
{% if grains['os_family'] == 'RedHat' %}
install_epel_repo:
pkg.installed:

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
uninstall_neofetch:
pkg.removed:
- name: neofetch