52 lines
1.9 KiB
YAML
52 lines
1.9 KiB
YAML
- name: Set up cloudtube config.js
|
|
template:
|
|
src: "conf/config.js.j2"
|
|
dest: "{{ docker_dir }}/cloudtube/config.js"
|
|
owner: 1000
|
|
group: 1000
|
|
mode: 0755
|
|
|
|
- name: Set up newleaf
|
|
template:
|
|
src: "conf/configuration.py.j2"
|
|
dest: "{{ docker_dir }}/cloudtube/configuration.py"
|
|
owner: 1000
|
|
group: 1000
|
|
mode: 0755
|
|
|
|
- name: Install packages for smart-ipv6-rotator
|
|
apt:
|
|
name:
|
|
- python3-pyroute2
|
|
- python3-requests
|
|
state: latest
|
|
install_recommends: false
|
|
|
|
- name: Clone smart-ipv6-rotator
|
|
ansible.builtin.git:
|
|
repo: https://github.com/iv-org/smart-ipv6-rotator.git
|
|
dest: "{{ docker_dir }}/cloudtube/smart-ipv6-rotator"
|
|
single_branch: yes
|
|
version: master
|
|
|
|
# - name: vultr cron
|
|
# cron:
|
|
# name: "Rotating IPv6 address on boot"
|
|
# special_time: "reboot"
|
|
# job: 'sleep 30s && python3 {{ docker_dir }}/cloudtube/smart-ipv6-rotator/smart-ipv6-rotator.py run --ipv6range=2001:19f0:4400:2e62::/64 && curl -H prio:low -d "Rotate IPv6 address successful" https://ntfy.opnxng.com/cron || curl -H tags:warning -H prio:high -d "Rotate IPv6 address failed!" https://ntfy.opnxng.com/cron;'
|
|
# user: root
|
|
# become: true
|
|
# when:
|
|
# - inventory_hostname == 'vultr'
|
|
#
|
|
# - name: vultr cron
|
|
# cron:
|
|
# name: "Rotating IPv6 address twice a day"
|
|
# minute: "0"
|
|
# hour: "*/12"
|
|
# job: 'python3 {{ docker_dir }}/cloudtube/smart-ipv6-rotator/smart-ipv6-rotator.py run --ipv6range=2001:19f0:4400:2e62::/64 && curl -H prio:low -d "Rotate IPv6 address successful" https://ntfy.opnxng.com/cron || curl -H tags:warning -H prio:high -d "Rotate IPv6 address failed!" https://ntfy.opnxng.com/cron;'
|
|
# user: root
|
|
# become: true
|
|
# when:
|
|
# - inventory_hostname == 'vultr'
|