Giter Site home page Giter Site logo

Comments (4)

cotedm avatar cotedm commented on August 22, 2024

Looks like we need to add a way to pass the environment variables into the systemd services. This issue will be used to make that happen. The restart and uninstall roles I'll open new issues for, makes sense to me!

from cp-ansible.

OneCricketeer avatar OneCricketeer commented on August 22, 2024

@cotedm

There was KAKFA-1566, not sure what happened to it, but it would enable putting EnvironmentFile as a systemd directive.

Otherwise, you would need to template out the systemd scripts to add something like

{% for k,v in service.environment.items() %}
Environment={{k}}={{v}}
{% endfor %}

from cp-ansible.

OneCricketeer avatar OneCricketeer commented on August 22, 2024

The other option would just template the EnvironmentFile in this project, then use lineinfile, and replacing [Service] with [Service]\nEnvironmentFile={{service}}-env.sh. And make sure that is idempotent.

from cp-ansible.

cotedm avatar cotedm commented on August 22, 2024

@Cricket007 yes that issue appears abandoned, so probably not a good option near term. I'm exploring if we can do a drop in and continue using the Confluent provided systemd scripts or use the systemctl edit style with ansible in some way. It seems the ansible systemd module doesn't support the environment or environmentfile directive. If that doesn't work out, I think templating the environment file and then referencing it from the on systemd scripts on the fly is the only way to go. A bit uglier.

from cp-ansible.

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.