mirror of
https://github.com/trailofbits/algo.git
synced 2025-10-05 18:15:31 +02:00
* Refactoring, booleans declaration and update users fix * Make server_name more FQDN compatible * Rename variables * Define the default value for store_cakey * Skip a prompt about the SSH user if deploying to localhost * Disable reboot for non-cloud deployments * Enable EC2 volume encryption by default * Add default server value (localhost) for the local installation Delete empty files * Add default region to aws_region_facts * Update docs * EC2 credentials fix * Warnings fix * Update deploy-from-ansible.md * Fix a typo * Remove lightsail from the docs * Disable EC2 encryption by default * rename droplet to server * Disable dependencies * Disable tls_cipher_suite * Convert wifi-exclude to a string. Update-users fix * SSH access congrats fix * 16.04 > 18.04 * Dont ask for the credentials if specified in the environment vars * GCE server name fix
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
---
|
|
- block:
|
|
- name: Dnsmasq installed
|
|
package: name=dnsmasq
|
|
|
|
- name: The dnsmasq directory created
|
|
file: dest=/var/lib/dnsmasq state=directory mode=0755 owner=dnsmasq group=nogroup
|
|
|
|
- include_tasks: ubuntu.yml
|
|
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
|
|
|
- include_tasks: freebsd.yml
|
|
when: ansible_distribution == 'FreeBSD'
|
|
|
|
- name: Dnsmasq configured
|
|
template:
|
|
src: dnsmasq.conf.j2
|
|
dest: "{{ config_prefix|default('/') }}etc/dnsmasq.conf"
|
|
notify:
|
|
- restart dnsmasq
|
|
|
|
- name: Adblock script created
|
|
template:
|
|
src: adblock.sh.j2
|
|
dest: /usr/local/sbin/adblock.sh
|
|
owner: root
|
|
group: "{{ root_group|default('root') }}"
|
|
mode: 0755
|
|
|
|
- name: Adblock script added to cron
|
|
cron:
|
|
name: Adblock hosts update
|
|
minute: 10
|
|
hour: 2
|
|
job: /usr/local/sbin/adblock.sh
|
|
user: root
|
|
|
|
- name: Update adblock hosts
|
|
command: /usr/local/sbin/adblock.sh
|
|
|
|
- meta: flush_handlers
|
|
|
|
- name: Dnsmasq enabled and started
|
|
service:
|
|
name: dnsmasq
|
|
state: started
|
|
enabled: yes
|
|
rescue:
|
|
- debug: var=fail_hint
|
|
tags: always
|
|
- fail:
|
|
tags: always
|