ansible/main.yml
2019-11-13 21:48:50 +01:00

42 lines
830 B
YAML

---
- hosts:
- synapse
# vars:
# -
handlers:
- name: reboot
reboot:
pre_tasks:
- apt:
update_cache: yes
- name: Disable IPv6
blockinfile:
path: /etc/sysctl.conf
block: |
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
notify: reboot
- name: apply ipv6 disable
command: sysctl -p
become: yes
- name: check ipv6 state
shell: cat /proc/sys/net/ipv6/conf/all/disable_ipv6
register: command_result
failed_when: "'1' not in command_result.stdout"
- apt:
name: python-pip
roles:
- geerlingguy.pip
- import_playbook: postgres.yml
- import_playbook: certbot.yml
# todo: create synapse user
- import_playbook: synapse.yml