Giter VIP home page Giter VIP logo

Comments (6)

nickjj avatar nickjj commented on July 20, 2024

Hi,

If you don't want to receive the email you can just override the default without modifying this role.

Just supply this in your inventory variables for the servers:

docker_cron_tasks:
  - job: docker system prune -f &>/dev/null
    name: "Docker clean up"
    schedule: ["0", "0", "*", "*", "0"]

That will override this role's default and you're good to go.

from ansible-docker.

jardleex avatar jardleex commented on July 20, 2024

You're right with that approach but I thought others may have the same "issue" and are interested in a built in solution.

from ansible-docker.

nickjj avatar nickjj commented on July 20, 2024

I'll think about it, and leave this open for a bit to see if anyone else has any feedback.

If you wanted to suppress all cron messages, to me that, that's something that should be done at the system level by configuring cron itself, not at the individual cron job level.

from ansible-docker.

nickjj avatar nickjj commented on July 20, 2024

Another thing to think about would be only redirecting STDOUT to /dev/null, this way if there's a problem, it gets mailed to you. What do you think about that?

from ansible-docker.

jardleex avatar jardleex commented on July 20, 2024

I prefer to avoid generating messages with low level informations (command output control) then filtering them after their creation (mail filter). Running this at scale would force the role user to implement a additional filter in another place/role when he decides to pick this Docker role. So he can't just use it, he'll have to spend additional effort in his environment as the role does not give him the choice what to receive.

Forwarding would be a better approach, yes. We only can hope that Docker puts his messages into the right channels then :).

from ansible-docker.

nickjj avatar nickjj commented on July 20, 2024

Ok, I'll remove all of it. It'll be in the next release.

from ansible-docker.

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.