Last active
February 8, 2022 18:10
-
-
Save pcnoic/ad3bc6c8b2df0163eb045a58856652da to your computer and use it in GitHub Desktop.
Ansible Playbook to install Syntropy Agent
This file contains hidden or 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
--- | |
- name: install syntropy agent | |
hosts: all | |
# tasks file for syntropy-agent | |
tasks: | |
- name: pull an image | |
docker_image: | |
name: syntropynet/agent:stable | |
- name: Stop and remove old container | |
docker_container: | |
name: syntropy-agent | |
state: absent | |
image: syntropy-agent | |
- name: Create Syntropy agent container and connect to network | |
docker_container: | |
name: syntropy-agent | |
restart_policy: unless-stopped | |
image: syntropynet/agent:stable | |
network_mode: "host" | |
purge_networks: no | |
env: | |
SYNTROPY_AGENT_TOKEN: AGENT_TOKEN | |
SYNTROPY_NETWORK_API: docker | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
- /var/lock/syntropy_agent.lock:/var/lock/syntropy_agent.lock | |
- /run/xtables.lock:/run/xtables.lock | |
devices: | |
- "/dev/net/tun:/dev/net/tun" | |
capabilities: | |
- net_admin | |
- sys_module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment