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

Semaphore don't delete the inventory files #448

Closed
MrTwIXx opened this issue Jan 19, 2018 · 6 comments · Fixed by #457
Closed

Semaphore don't delete the inventory files #448

MrTwIXx opened this issue Jan 19, 2018 · 6 comments · Fixed by #457
Assignees

Comments

@MrTwIXx
Copy link

MrTwIXx commented Jan 19, 2018

Hey there,

AFter some executions from playbooks with semaphore, I saw a lot inventory files in the semaphore directory.
Is there a way that Semaphore delete them automaticly after finishing the playbook?

Thanks for the answer

@twhiston
Copy link
Contributor

I can see two solutions to this that don't involve a lot of changes:

1 - move the inventory files to their own sub directory, allowing you to schedule a cronjob to delete them as needed.
2 - change the way that inventory files are named and use the project id instead of the task id to identify them, overwriting them each time.

Personally I prefer the 1st option as it allows you to keep an audit trail of inventory changes if needed

@strangeman
Copy link
Contributor

Partly duplicate with #328

@strangeman
Copy link
Contributor

Yeah, first option is better

@twhiston
Copy link
Contributor

@strangeman what files that Semaphore writes should we consider ephemeral?

IMO everything in the util.Config.TmpPath could be considered that, except semaphore_config.json which gets placed there by semaphore-startup.sh. If we move this file we can just consider the whole directory as expendable and either write it to /tmp or schedule a cron job to delete it. That way we don't really need to introduce any logic around clearing up or not (global or task level, ui changes etc.... its a fair bit of work for a small feature imo) inside the application. What do you think?

@strangeman
Copy link
Contributor

Looks good for me. This is an easy and effective solution.

@twhiston
Copy link
Contributor

first part of this is merged (creating tmp dir if it does not exist #461)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants