This commit is contained in:
Jack Ivanov 2019-01-19 05:39:08 +01:00 committed by Dan Guido
parent 7a338b511d
commit 7a6daff1ff
4 changed files with 14 additions and 23 deletions

View file

@ -1,4 +1,10 @@
---
- name: Gather facts
setup:
- name: Gather additional facts
import_tasks: facts.yml
- set_fact:
config_prefix: "/usr/local/"
strongswan_shell: /usr/sbin/nologin
@ -23,17 +29,11 @@
value: 1
- item: "{{ 'net.inet6.ip6.forwarding' if ipv6_support else none }}"
value: 1
tags:
- always
- setup:
- name: Install tools
package: name="{{ item }}" state=present
with_items:
- "{{ tools|default([]) }}"
tags:
- always
- name: Loopback included into the rc config
blockinfile:
@ -45,8 +45,6 @@
ifconfig_lo100_ipv6="inet6 FCAA::1/64"
notify:
- restart loopback bsd
tags:
- always
- name: Enable the gateway features
lineinfile: dest=/etc/rc.conf regexp='^{{ item.param }}.*' line='{{ item.param }}={{ item.value }}'
@ -59,8 +57,6 @@
- { param: natd_flags, value: '"-dynamic -m"' }
notify:
- restart ipfw
tags:
- always
- name: FreeBSD | Activate IPFW
shell: >

View file

@ -6,12 +6,13 @@
- include_tasks: ubuntu.yml
when: '"Ubuntu" in OS.stdout or "Linux" in OS.stdout'
tags:
- update-users
- include_tasks: freebsd.yml
when: '"FreeBSD" in OS.stdout'
- name: Gather additional facts
import_tasks: facts.yml
tags:
- update-users
- name: Sysctl tuning
sysctl: name="{{ item.item }}" value="{{ item.value }}"

View file

@ -71,8 +71,6 @@
dest: /etc/systemd/network/10-algo-lo100.network
notify:
- restart systemd-networkd
tags:
- always
- name: systemd services enabled and started
systemd:
@ -83,12 +81,8 @@
with_items:
- systemd-networkd
- systemd-resolved
tags:
- always
- meta: flush_handlers
tags:
- always
- name: Check apparmor support
shell: apparmor_status
@ -99,6 +93,9 @@
apparmor_enabled: true
when: '"profiles are in enforce mode" in apparmor_status.stdout'
- name: Gather additional facts
import_tasks: facts.yml
- set_fact:
tools:
- git
@ -116,15 +113,11 @@
value: 1
- item: "{{ 'net.ipv6.conf.all.forwarding' if ipv6_support else none }}"
value: 1
tags:
- always
- name: Install tools
package: name="{{ item }}" state=present
with_items:
- "{{ tools|default([]) }}"
tags:
- always
- name: Install headers
apt:

View file

@ -62,6 +62,7 @@
- block:
- name: Local pre-tasks
import_tasks: playbooks/cloud-pre.yml
become: false
rescue:
- debug: var=fail_hint
tags: always