-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: "enable weblogin-cleanup job" | ||
systemd: | ||
name: "weblogin-cleanup.timer" | ||
enabled: true | ||
state: "started" | ||
daemon_reload: true | ||
|
||
- name: "run weblogin-cleanup job" | ||
systemd: | ||
name: "weblogin-cleanup.service" | ||
state: "started" | ||
daemon_reload: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[Unit] | ||
Description=Weblogin cleanup | ||
After=syslog.target network.target | ||
|
||
[Service] | ||
Type=oneshot | ||
WorkingDirectory={{weblogin_basedir}}/home | ||
ExecStart=/usr/bin/docker stop {{ containers.weblogin }} | ||
ExecStart=/usr/bin/docker rm {{ containers.weblogin }} | ||
ExecStart=+/bin/sh -c 'rm -rf {{weblogin_basedir}}/home/.??*' | ||
ExecStart=+/bin/sh -c 'rm -rf {{weblogin_basedir}}/home/*' | ||
ExecStart=/usr/bin/docker run -d \ | ||
-p 1022:22 \ | ||
-e URL={{ demo1_weblogin_url }} \ | ||
-e TOKEN={{ demo1_weblogin_token }} \ | ||
-v {{ weblogin_basedir }}/home:/home \ | ||
--name {{ containers.weblogin }} \ | ||
--network {{ internal_network }} \ | ||
{{ images.weblogin }} | ||
SyslogIdentifier=weblogin-cleanup | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Unit] | ||
Description=Create Weblogin cleanup timer | ||
|
||
[Timer] | ||
OnCalendar=01:00:00 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |