aboutsummaryrefslogtreecommitdiff
path: root/roles/sliver-c2/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/sliver-c2/tasks')
-rw-r--r--roles/sliver-c2/tasks/apt_install.yaml3
-rw-r--r--roles/sliver-c2/tasks/sliver_configure.yaml8
-rw-r--r--roles/sliver-c2/tasks/sliver_systemd.yaml11
3 files changed, 20 insertions, 2 deletions
diff --git a/roles/sliver-c2/tasks/apt_install.yaml b/roles/sliver-c2/tasks/apt_install.yaml
index 8910e04..3e118bc 100644
--- a/roles/sliver-c2/tasks/apt_install.yaml
+++ b/roles/sliver-c2/tasks/apt_install.yaml
@@ -2,4 +2,5 @@
apt:
name: "{{ apt_packages }}"
state: present
- update_cache: true \ No newline at end of file
+ update_cache: true
+ cache_valid_time: 86400
diff --git a/roles/sliver-c2/tasks/sliver_configure.yaml b/roles/sliver-c2/tasks/sliver_configure.yaml
index b90d955..cd3fa04 100644
--- a/roles/sliver-c2/tasks/sliver_configure.yaml
+++ b/roles/sliver-c2/tasks/sliver_configure.yaml
@@ -28,7 +28,13 @@
loop_control:
loop_var: operator
command: /opt/sliver/sliver-server operator --name {{ operator }} --lhost {{ sliver_server }} --save /root/.sliver-client/configs
- notify: sliver systemd handler
+
+- name: sliver systemd handler
+ systemd:
+ name: sliver
+ state: restarted
+ enabled: true
+ when: ansible_service_mgr == 'systemd'
- name: fix permissions for .sliver-client directory
file:
diff --git a/roles/sliver-c2/tasks/sliver_systemd.yaml b/roles/sliver-c2/tasks/sliver_systemd.yaml
index 3b29f0f..40ff890 100644
--- a/roles/sliver-c2/tasks/sliver_systemd.yaml
+++ b/roles/sliver-c2/tasks/sliver_systemd.yaml
@@ -8,3 +8,14 @@
notify:
- reload systemd
- sliver systemd handler
+
+- name: reload systemd
+ command: systemctl daemon-reload
+ when: ansible_service_mgr == 'systemd'
+
+- name: sliver systemd handler
+ systemd:
+ name: sliver
+ state: restarted
+ enabled: true
+ when: ansible_service_mgr == 'systemd'