Skip to content

Commit

Permalink
fix(init.sls): ensure dbus is available for locale.system state
Browse files Browse the repository at this point in the history
  • Loading branch information
javierbertoli committed Oct 14, 2020
1 parent 32f6593 commit c8e0e54
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
4 changes: 4 additions & 0 deletions locale/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ locale:
config: '/etc/locale.conf'
pkgs: []
present: []
dbus:
pkg: dbus
service: dbus
run_service: true
15 changes: 15 additions & 0 deletions locale/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ locale_present_{{ l|replace('.', '_')|replace(' ', '_') }}:
{%- endfor %}
{% if locale.default is defined %}
dbus_for_locale:
pkg.installed:
- name: {{ locale.dbus.pkg }}
- require_in:
- locale: locale_default
{%- if locale.dbus.run_service %}
service.running:
- name: {{ locale.dbus.service }}
- enable: true
- require:
- pkg: dbus_for_locale
- require_in:
# `dbus` is required for running `localectl`
- locale: locale_default
{%- endif %}
locale_default:
locale.system:
- name: {{ locale.default.name }}
Expand Down
2 changes: 2 additions & 0 deletions locale/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ RedHat:
Suse:
pkgs:
- glibc-locale
dbus:
pkg: dbus-1

Arch:
pkgs:
Expand Down
40 changes: 39 additions & 1 deletion locale/osfingermap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,42 @@
# you will need to provide at least an empty dict in this file, e.g.
# osfingermap: {}
---
osfingermap: {}
# os: Debian
Debian-10: {}
Debian-9: {}
Debian-8: {}

# os: Ubuntu
Ubuntu-18.04: {}
Ubuntu-16.04:
dbus:
run_service: false

# os: Fedora
Fedora-31: {}
Fedora-30: {}

# os: CentOS
CentOS Linux-8: {}
CentOS Linux-7: {}
CentOS-6:
dbus:
run_service: false

# os: Amazon
Amazon Linux-2: {}
Amazon Linux AMI-2018:
dbus:
run_service: false

# os: SUSE
Leap-15: {}

# os: FreeBSD
FreeBSD-12: {}

# os: Windows
Windows-8.1: {}

# os: Gentoo
Gentoo-2: {}

0 comments on commit c8e0e54

Please sign in to comment.