Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for custom restart scripts #55

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

mabezi
Copy link
Contributor

@mabezi mabezi commented Feb 20, 2024

As the title says: It would be great to have the possibility to define your own restart scripts.
There are quite a few possible uses for this.

And this form of implementation gives you maximum leeway, as you can either write them directly into the variable definition or read them from a file using lookup.

Examples:

needrestart_restartd:
  - name: unbound
    script: "echo "restart unbound!" && systemctl restart unbound.service"
needrestart_restartd:
  - name: unbound
    script: "{{ lookup('template', 'files/custom-restart', errors='strict') }}"

@mabezi
Copy link
Contributor Author

mabezi commented Feb 20, 2024

fixed two typos

@t2d
Copy link
Contributor

t2d commented Feb 21, 2024

Cool, that looks useful. Can you please fix the linting issue?

@mabezi
Copy link
Contributor Author

mabezi commented Feb 22, 2024

That should fix it now. ansible-lint and I somehow don't become friends 😄

tasks/main.yml Outdated Show resolved Hide resolved
@doobry-systemli doobry-systemli merged commit 6553705 into systemli:main Feb 22, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants