saltstack-formulas / systemd-formula

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

systemd-formula don't create the service file in target system

MurzNN opened this issue · comments

I have created this Pillar file, based on https://github.com/saltstack-formulas/systemd-formula/blob/master/pillar.example:

systemd:
  service:
    test:
      enabled: true
      status: running
      Unit:
        Description: Test service
        After: network.target

      Service:
        ExecStart: osrm-routed /home/brick-osm/osrm-data/RU.osrm
        WorkingDirectory: /home/brick-osm/osrm-data
        User: brick-osm
        Group: brick-osm

      Install:
        WantedBy: multi-user.target

It's included successfully when applying configuration, and produce no errors. But as result, no service is created on target minion. Can you please help to find, where is can be the problem?

Maybe I need to add some additional required parameter to yaml for make this works? Or maybe move the service configuration to 'systemd.units' group?

OS: Ubuntu 20.04, Solr 3002.2+ds-1

The verbose output about systemd formula is:

----------
          ID: systemd_main_pkg
    Function: pkg.installed
        Name: systemd
      Result: True
     Comment: All specified packages are already installed
     Started: 10:07:37.436229
    Duration: 14.628 ms
     Changes:   
----------
          ID: systemd_lib_pkgs
    Function: pkg.installed
      Result: True
     Comment: All specified packages are already installed
     Started: 10:07:37.451152
    Duration: 15.736 ms
     Changes:   
----------
          ID: systemd_extra_pkgs
    Function: pkg.installed
      Result: True
     Comment: All specified packages are already installed
     Started: 10:07:37.467190
    Duration: 14.212 ms
     Changes:   
----------

@MurzNN you need to add systemd.units state to your minion, not only the systemd state.

Yeah, that's works, thanks!