aboutsummaryrefslogtreecommitdiff
path: root/sliver-c2/tasks/sliver_configure.yaml
diff options
context:
space:
mode:
authorheqnx <root@heqnx.com>2025-05-25 08:23:11 +0300
committerheqnx <root@heqnx.com>2025-05-25 08:23:11 +0300
commit56b09942c04c191b7581a26e1375226d40709a34 (patch)
tree4042a01a25b62ac16571b1dc86daf9fe2c6313d9 /sliver-c2/tasks/sliver_configure.yaml
parentbcd55b16115ed51075686a68402134680ac80ae9 (diff)
downloadansible-playbooks-56b09942c04c191b7581a26e1375226d40709a34.tar.gz
ansible-playbooks-56b09942c04c191b7581a26e1375226d40709a34.zip
added sliver ansible playbook
Diffstat (limited to 'sliver-c2/tasks/sliver_configure.yaml')
-rw-r--r--sliver-c2/tasks/sliver_configure.yaml41
1 files changed, 41 insertions, 0 deletions
diff --git a/sliver-c2/tasks/sliver_configure.yaml b/sliver-c2/tasks/sliver_configure.yaml
new file mode 100644
index 0000000..68d2ba4
--- /dev/null
+++ b/sliver-c2/tasks/sliver_configure.yaml
@@ -0,0 +1,41 @@
+- name: ensure .sliver config directory exists
+ file:
+ path: /root/.sliver/configs
+ state: directory
+ owner: root
+ group: root
+ mode: '0700'
+
+- name: deploy custom server.json config
+ template:
+ src: server.json.j2
+ dest: /root/.sliver/configs/server.json
+ owner: root
+ group: root
+ mode: '0600'
+ force: true
+
+- name: ensure sliver client config directory exists
+ file:
+ path: /root/.sliver-client/configs
+ state: directory
+ owner: root
+ group: root
+ mode: '0700'
+
+- name: generate sliver operator profiles
+ loop: "{{ sliver_operators }}"
+ 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: fix permissions for .sliver-client directory
+ file:
+ path: /root/.sliver-client
+ state: directory
+ recurse: true
+ owner: root
+ group: root
+