Code Monkey home page Code Monkey logo

Comments (6)

bastelfreak avatar bastelfreak commented on September 18, 2024

Hi,
this already works fine:
https://github.com/voxpupuli/puppet-borg/blob/f2c66b51c46d57b25326524415c0e9ced683a469/manifests/service.pp#L11-L26

https://github.com/voxpupuli/puppet-borg/blob/f2c66b51c46d57b25326524415c0e9ced683a469/templates/borg-backup.timer.epp#L1-L13

from puppet-systemd.

trevor-vaughan avatar trevor-vaughan commented on September 18, 2024

@bastelfreak I agree that it works, but it's confusing for end users. It would be nice to have a defined type or something that just wraps it to be more clear.

from puppet-systemd.

traylenator avatar traylenator commented on September 18, 2024

I was just contemplating writing a systemd::timer type , will try something.

from puppet-systemd.

traylenator avatar traylenator commented on September 18, 2024

The only interface that makes sense would be

systemd::timer{'runoften.timer':
    timer_content   => ...
    service_content =>
    enable => true,
    active => true,
}

Essentially to specify the content of the service and timer unit.

It does not make sense to specify the individual say OnCalandar arguments since this gets tricky because you then have to define the Before, , After, multiple OnCalendar, ...

The alternative is to only support really trivial jobs. Such as

systemd::timer{'myjob':
  exec => 'rm -rf /',
  on_calendar => 'daily',
}

along with some other timer options. Anything more complicated would require to resort back to two systemd::unit_files as per the above examples.

So is the latter one still worth while.

from puppet-systemd.

trevor-vaughan avatar trevor-vaughan commented on September 18, 2024

@traylenator I think that it is. I also think that a wrapper that creates the rest of the bits for a generally useful OnCalendar example would be useful but could be a later addition.

from puppet-systemd.

raphink avatar raphink commented on September 18, 2024

Implemented in #138

from puppet-systemd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.