Installing sing-box on Linux via Ansible
Ansible automates the management of remote systems and controls their desired state. more details Automation with Ansible.
Ansible automates the management of remote systems and controls their desired state. [Installing Ansible on Ubuntu]
vi /etc/ansible/hosts
ansible all -m ping
#Gathers facts about remote hosts
ansible all -m setup
# Download project and cd to project dir
vi ./src/hosts
# Changing SERVER-IP,USER and PORT
[servers]
SERVER-IP ansible_user=USER ansible_port=PORT
vi ./src/roles/server-sing-box/vars/main.yml
# Changing port and SNI
listen_port: 443
server_name: 'example.com'
cd ./src
ansible-playbook -i ./hosts ./install-playbook.yaml -t servers
ansible-playbook -i ./hosts ./install-playbook.yaml -t servers -K
-k, --ask-pass: ask for connection password
-K, --ask-become-pass: ask for privilege escalation password
vi src/roles/client-sing-box/vars/main.yml
# Changing below vars based on server info
server_ipv4: 'a'
uuid: 'b'
server_name: 'c'
public_key: 'd'
short_id: 'e'
cd ./src
ansible-playbook ./install-playbook.yaml -t clients