Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3745154
D963.id2461.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D963.id2461.diff
View Options
diff --git a/roles/core/hostname/init.sls b/roles/core/hostname/init.sls
--- a/roles/core/hostname/init.sls
+++ b/roles/core/hostname/init.sls
@@ -26,7 +26,7 @@
- onchanges:
- file: /etc/hostname
-{% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+{% if grains['os_family'] == 'Debian' %}
after_hostname_change_debian:
cmd.run:
- name: invoke-rc.d hostname.sh start
diff --git a/roles/core/motd/init.sls b/roles/core/motd/init.sls
--- a/roles/core/motd/init.sls
+++ b/roles/core/motd/init.sls
@@ -8,7 +8,7 @@
motd:
file.managed:
- {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+ {% if grains['os_family'] == 'Debian' %}
- name: /etc/motd.tail
{% else %}
- name: /etc/motd
diff --git a/roles/core/network/init.sls b/roles/core/network/init.sls
--- a/roles/core/network/init.sls
+++ b/roles/core/network/init.sls
@@ -10,7 +10,7 @@
# IPv6
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+{% if grains['os_family'] == 'Debian' %}
network_ipv6:
file.managed:
- name : /usr/sbin/ipv6-setup-tunnel
diff --git a/roles/core/rc/init.sls b/roles/core/rc/init.sls
--- a/roles/core/rc/init.sls
+++ b/roles/core/rc/init.sls
@@ -10,7 +10,7 @@
# IPv6
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+{% if grains['os_family'] == 'Debian' %}
rc:
file.managed:
- name : /etc/rc.local
diff --git a/roles/mailserver/dkim/init.sls b/roles/mailserver/dkim/init.sls
--- a/roles/mailserver/dkim/init.sls
+++ b/roles/mailserver/dkim/init.sls
@@ -37,7 +37,7 @@
- installed
- pkgs:
- opendkim
- {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+ {% if grains['os_family'] == 'Debian' %}
- opendkim-tools
{% endif %}
diff --git a/roles/shellserver/database/mysql.sls b/roles/shellserver/database/mysql.sls
--- a/roles/shellserver/database/mysql.sls
+++ b/roles/shellserver/database/mysql.sls
@@ -16,7 +16,7 @@
pkg:
- installed
- pkgs:
- {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+ {% if grains['os_family'] == 'Debian' %}
- mariadb-server
{% elif grains['os'] == 'FreeBSD' %}
- mariadb101-server
diff --git a/roles/shellserver/userland-software/base.sls b/roles/shellserver/userland-software/base.sls
--- a/roles/shellserver/userland-software/base.sls
+++ b/roles/shellserver/userland-software/base.sls
@@ -34,7 +34,7 @@
- vim
- nano
- joe
- {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+ {% if grains['os_family'] == 'Debian' %}
- emacs-nox
{% elif grains['os'] == 'FreeBSD' %}
- emacs-nox11
@@ -56,7 +56,7 @@
- tree
- whois
- woof
- {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+ {% if grains['os_family'] == 'Debian' %}
- bsdmainutils
- sockstat
- dnsutils
@@ -113,7 +113,7 @@
pkg:
- removed
- pkgs:
- {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+ {% if grains['os_family'] == 'Debian' %}
- php7.0
{% elif grains['os'] == 'FreeBSD' %}
- php70
@@ -124,7 +124,7 @@
- installed
- pkgs:
- python3
- {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+ {% if grains['os_family'] == 'Debian' %}
- tcl8.6-dev
- php7.1
{% elif grains['os'] == 'FreeBSD' %}
@@ -141,7 +141,7 @@
- installed
- pkgs:
- tcllib
- {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+ {% if grains['os_family'] == 'Debian' %}
- tcl-tls
{% elif grains['os'] == 'FreeBSD' %}
- tcltls
@@ -156,7 +156,7 @@
- installed
- pkgs:
- verbiste
- {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' %}
+ {% if grains['os_family'] == 'Debian' %}
- aspell-fr
{% elif grains['os'] == 'FreeBSD' %}
- fr-aspell
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 12:35 (22 h, 19 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2247398
Default Alt Text
D963.id2461.diff (4 KB)
Attached To
Mode
D963: Simplify Debian/Ubuntu OS family matching
Attached
Detach File
Event Timeline
Log In to Comment