Merge "Insert a new line before a section name"
diff --git a/linux/map.jinja b/linux/map.jinja
index de250bb..c623d63 100644
--- a/linux/map.jinja
+++ b/linux/map.jinja
@@ -18,6 +18,7 @@
},
'selinux': 'permissive',
'ca_certs_dir': '/usr/local/share/ca-certificates',
+ 'ca_certs_bin': 'update-ca-certificates',
'atop': {
'enabled': false,
'interval': '20',
@@ -45,6 +46,7 @@
},
'selinux': 'permissive',
'ca_certs_dir': '/usr/local/share/ca-certificates',
+ 'ca_certs_bin': 'update-ca-certificates',
'atop': {
'enabled': false,
'interval': '20',
@@ -71,7 +73,8 @@
'pkgs': []
},
'selinux': 'permissive',
- 'ca_certs_dir': '/usr/local/share/ca-certificates',
+ 'ca_certs_dir': '/etc/pki/ca-trust/source/anchors',
+ 'ca_certs_bin': 'update-ca-trust extract',
'atop': {
'enabled': false,
'interval': '20',
diff --git a/linux/system/certificate.sls b/linux/system/certificate.sls
index f9f39d4..ffa20c4 100644
--- a/linux/system/certificate.sls
+++ b/linux/system/certificate.sls
@@ -35,7 +35,7 @@
update_certificates:
cmd.wait:
- - name: update-ca-certificates
+ - name: {{ system.ca_certs_bin }}
{%- endif %}
diff --git a/linux/system/job.sls b/linux/system/job.sls
index 5037ff7..09ae0de 100644
--- a/linux/system/job.sls
+++ b/linux/system/job.sls
@@ -1,12 +1,16 @@
{%- from "linux/map.jinja" import system with context %}
{%- if system.enabled %}
+include:
+- linux.system.user
+
{%- for name, job in system.job.iteritems() %}
linux_job_{{ job.command }}:
{%- if job.enabled|default(True) %}
cron.present:
- - name: {{ job.command }}
+ - name: >
+ {{ job.command }}
{%- if job.get('identifier', True) %}
- identifier: {{ job.get('identifier', job.get('name', name)) }}
{%- endif %}
diff --git a/linux/system/motd.sls b/linux/system/motd.sls
index e1450c3..f6cdc47 100644
--- a/linux/system/motd.sls
+++ b/linux/system/motd.sls
@@ -10,15 +10,28 @@
{%- else %}
+{%- if grains.os == 'Ubuntu' %}
package_update_motd:
pkg.installed:
- name: update-motd
+ - require_in:
+ - file: /etc/update-motd.d
+{%- endif %}
/etc/update-motd.d:
file.directory:
- clean: true
- - require:
- - pkg: package_update_motd
+
+{%- if grains.oscodename == "jessie" %}
+motd_fix_pam_sshd:
+ file.replace:
+ - name: /etc/pam.d/sshd
+ - pattern: "/run/motd.dynamic"
+ - repl: "/run/motd"
+{%- endif %}
+
+/etc/motd:
+ file.absent
{%- for motd in system.motd %}
{%- set motd_index = loop.index %}