aboutsummaryrefslogtreecommitdiff
path: root/old/sliver-c2/tasks/sliver_configure.yaml
diff options
context:
space:
mode:
authorheqnx <root@heqnx.com>2025-05-25 11:50:46 +0300
committerheqnx <root@heqnx.com>2025-05-25 11:50:46 +0300
commit7c8ed923df3c02338dfbf826fd6fd9a23dac502e (patch)
tree929ee32e5a6f32e952bb8fcad33f704a371af9ff /old/sliver-c2/tasks/sliver_configure.yaml
parente905a6a60ceb43ef2bfa8f0f61c23630955caf1f (diff)
downloadansible-playbooks-7c8ed923df3c02338dfbf826fd6fd9a23dac502e.tar.gz
ansible-playbooks-7c8ed923df3c02338dfbf826fd6fd9a23dac502e.zip
moved unorganized playbooks into old folder
Diffstat (limited to 'old/sliver-c2/tasks/sliver_configure.yaml')
-rw-r--r--old/sliver-c2/tasks/sliver_configure.yaml40
1 files changed, 40 insertions, 0 deletions
diff --git a/old/sliver-c2/tasks/sliver_configure.yaml b/old/sliver-c2/tasks/sliver_configure.yaml
new file mode 100644
index 0000000..bf4797e
--- /dev/null
+++ b/old/sliver-c2/tasks/sliver_configure.yaml
@@ -0,0 +1,40 @@
+- name: ensure .sliver config directory exists
+ file:
+ path: "{{ install_path }}/.sliver/configs"
+ state: directory
+ owner: root
+ group: root
+ mode: '0700'
+
+- name: deploy custom server.json config
+ template:
+ src: server.json.j2
+ dest: "{{ install_path }}/.sliver/configs/server.json"
+ owner: root
+ group: root
+ mode: '0600'
+ force: true
+
+- name: ensure sliver client config directory exists
+ file:
+ path: "{{ install_path }}/.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
+