trombik.dbus

ansible-role-dbus

Installieren und Konfigurieren von dbus

Anforderungen

Keine

Rollenvariablen

Variable Beschreibung Standard
dbus_user Benutzer von dbus {{ __dbus_user }}
dbus_group Gruppe von dbus {{ __dbus_group }}
dbus_package Paketname von dbus {{ __dbus_package }}
dbus_service Dienstname von dbus {{ __dbus_service }}
dbus_conf_dir Pfad zum Konfigurationsverzeichnis {{ __dbus_conf_dir }}
dbus_systemd_dir Pfad zum system.d Verzeichnis {{ dbus_conf_dir }}/system.d
dbus_conf_file Pfad zur system-local.conf {{ dbus_conf_dir }}/system-local.conf
dbus_system_local_config Inhalt der system-local.conf Siehe unten
dbus_systemd_config Liste von Dateien im Verzeichnis system.d. Siehe unten []

dbus_system_local_config

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 <busconfig></busconfig>

dbus_systemd_config

Diese Variable ist eine Liste von Dictionaries, die Dateien im dbus_systemd_dir darstellt.

Schlüssel Wert Pflicht?
name Dateiname ja
state Entweder present oder absent ja
content Der Inhalt der Datei nein

Debian

Variable Standard
__dbus_user messagebus
__dbus_group messagebus
__dbus_package dbus
__dbus_conf_dir /etc/dbus-1
__dbus_service dbus.service

FreeBSD

Variable Standard
__dbus_user messagebus
__dbus_group messagebus
__dbus_package devel/dbus
__dbus_conf_dir /usr/local/etc/dbus-1
__dbus_service dbus

OpenBSD

Variable Standard
__dbus_user _dbus
__dbus_group _dbus
__dbus_package dbus
__dbus_conf_dir /etc/dbus-1
__dbus_service messagebus

RedHat

Variable Standard
__dbus_user messagebus
__dbus_group messagebus
__dbus_package dbus
__dbus_conf_dir /etc/dbus-1
__dbus_service dbus.service

Abhängigkeiten

Keine

Beispiel Playbook

- hosts: localhost
  roles:
    - ansible-role-dbus
  pre_tasks:
    - name: Erstelle _avahi Benutzer
      user:
        name: _avahi
        state: present
      when:
        - ansible_os_family != 'FreeBSD'
        - ansible_os_family != 'OpenBSD'
    - name: Erstelle wheel Gruppe
      group:
        name: wheel
        state: present
      when:
        - ansible_os_family != 'FreeBSD'
        - ansible_os_family != 'OpenBSD'

  vars:
    dbus_systemd_config:
      - name: foo.conf
        state: absent
      - name: avahi-dbus.conf
        state: present
        content: |
          <!DOCTYPE busconfig PUBLIC
                    "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
                    "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
          <busconfig>

            <!-- Nur Root oder der Benutzer _avahi kann den Avahi-Dienst besitzen -->
            <policy user="_avahi">
              <allow own="org.freedesktop.Avahi"/>
            </policy>
            <policy user="root">
              <allow own="org.freedesktop.Avahi"/>
            </policy>

            <!-- Jeder kann Methoden auf dem Avahi-Server aufrufen, außer SetHostName -->
            <policy context="default">
              <allow send_destination="org.freedesktop.Avahi"/>
              <allow receive_sender="org.freedesktop.Avahi"/>

              <deny send_destination="org.freedesktop.Avahi"
                    send_interface="org.freedesktop.Avahi.Server" send_member="SetHostName"/>
            </policy>

            <!-- Erlaube alles, einschließlich Zugriff auf SetHostName für Benutzer der Gruppe "wheel" -->
            <policy group="wheel">
              <allow send_destination="org.freedesktop.Avahi"/>
              <allow receive_sender="org.freedesktop.Avahi"/>
            </policy>
            <policy user="root">
              <allow send_destination="org.freedesktop.Avahi"/>
              <allow receive_sender="org.freedesktop.Avahi"/>
            </policy>
          </busconfig>

Lizenz

Copyright (c) 2017 Tomoyuki Sakurai <[email protected]>

Erlaubnis zur Nutzung, Kopie, Modifikation und Verteilung dieser Software für jeden
Zweck mit oder ohne Gebühr wird hiermit gewährt, vorausgesetzt, dass der oben genannte 
Copyright-Hinweis und dieser Erlaubnis-Hinweis in allen Kopien erscheinen.

DIE SOFTWARE WIRD "WIE KAPUTT" BEREITGESTELLT UND DER AUTOR LEHNT ALLE GARANTIEN
HINSICHTLICH DIESER SOFTWARE AB, EINSCHLIESSLICH ALLER IMPLIZITEN GARANTIEN DER
MARKTFÄHIGKEIT UND EIGNUNG. IN KEINEM FALL HAFTET DER AUTOR FÜR BESONDERE, DIREKTE,
INDIREKTE ODER FOLGE-SCHÄDEN ODER FÜR SCHÄDEN JEDER ART, DIE AUS DEM VERLUST VON NUTZUNG,
DATEN ODER GEWINNEN RESULTIEREN, OB IN EINER KLAGE AUS VERTRAG, FAHRLÄSSIGKEIT ODER ANDERER
RECHTSGRUNDLAGE, DIE AUS DER NUTZUNG ODER DER LEISTUNG DIESER SOFTWARE RESULTIERT.

Autoreninformation

Tomoyuki Sakurai tomoyukis@reallyenglish.com

Dieses README wurde von qansible erstellt.

Über das Projekt

Install and configure dbus

Installieren
ansible-galaxy install trombik.dbus
GitHub Repository
Lizenz
isc
Downloads
72
Besitzer
PGP finger print: 03EB 3D97 5E04 9B0C AB21 93A2 D693 42A9 EFBC 3577 Makerspace and Coliving in Siem Reap, Cambodia: http://info.mkrsgh.org/