Code Monkey home page Code Monkey logo

Comments (6)

mpdehaan avatar mpdehaan commented on June 13, 2024

Hi,

Thanks for filing this ticket, though this is an issue, but not a pull request. Can you make it as a pull request?

Thanks!

from ansible-modules-core.

ibebian avatar ibebian commented on June 13, 2024

+1 on addressing this in the cron module, setting env through the module would be very useful

from ansible-modules-core.

m00dawg avatar m00dawg commented on June 13, 2024

👍 This would be a highly useful feature.

from ansible-modules-core.

ibebian avatar ibebian commented on June 13, 2024

workaround so far is to place env vars inline into crontab file, then use command module to register that cron job.

If your variables are static this should be easy-peasy, and if you need to set them based on other values such as staging/production, use the jinja2 template module combined with vars_files and define the corresponding env from the command line when running the playbook.

from ansible-modules-core.

JocelynDelalande avatar JocelynDelalande commented on June 13, 2024

FYI, this issue is addressable via cronvar module

from ansible-modules-core.

jeffwidman avatar jeffwidman commented on June 13, 2024

A pull request incorporating this into Ansible's core cron module was accepted just last week:
#2010

Once that's released, I don't see a need for the cronvar module, and filed an issue suggesting it be deprecated: ansible/ansible-modules-extras#1779

If you have a use case supported by cronvar that's not supported by cron (once this PR makes it into a public release) then probably a good idea to comment on the issue above.

from ansible-modules-core.

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.