2017-10-27 03:43:50 +00:00
|
|
|
# Common OS-Level Additions & Mods (that only need to be performed once)
|
|
|
|
|
2017-10-30 20:31:16 +00:00
|
|
|
- name: ...IS BEGINNING ==========================================
|
2017-10-27 03:43:50 +00:00
|
|
|
command: echo
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2019-01-15 20:33:02 +00:00
|
|
|
- name: Create IIAB directory structure ("file layout")
|
2019-01-15 12:16:08 +00:00
|
|
|
include_tasks: fl.yml
|
|
|
|
|
2017-10-31 03:55:24 +00:00
|
|
|
- include_tasks: centos.yml
|
2017-05-27 18:09:50 +00:00
|
|
|
when: ansible_distribution == "CentOS"
|
|
|
|
|
2017-10-31 03:55:24 +00:00
|
|
|
- include_tasks: fedora.yml
|
2017-05-27 18:09:50 +00:00
|
|
|
when: ansible_distribution == "Fedora"
|
|
|
|
|
2017-11-09 10:51:07 +00:00
|
|
|
- include_tasks: prep.yml
|
|
|
|
when: not is_debuntu
|
|
|
|
|
|
|
|
- include_tasks: xo.yml
|
|
|
|
when: xo_model != "none" or osbuilder is defined
|
|
|
|
|
2017-10-31 03:55:24 +00:00
|
|
|
- include_tasks: packages.yml
|
2017-11-09 12:11:15 +00:00
|
|
|
- include_tasks: iptables.yml
|
2017-11-09 10:51:07 +00:00
|
|
|
|
2020-11-28 04:25:27 +00:00
|
|
|
# Ongoing rework (e.g. PR #2652) arising from ansible.posix collection changes:
|
2020-11-28 01:51:51 +00:00
|
|
|
- name: Use 'sysctl' to set 5 network/kernel settings, turning off IPv6 if possible
|
|
|
|
sysctl: # Places these settings in /etc/sysctl.conf, to survive reboot
|
|
|
|
name: "{{ item.name }}"
|
|
|
|
value: "{{ item.value }}"
|
|
|
|
with_items:
|
2020-11-28 03:04:38 +00:00
|
|
|
- { name: 'net.ipv4.ip_forward', value: '1' } # Masquerading LAN->Internet
|
2020-11-28 01:51:51 +00:00
|
|
|
- { name: 'net.ipv4.conf.default.rp_filter', value: '1' }
|
|
|
|
- { name: 'net.ipv4.conf.default.accept_source_route', value: '0' }
|
2020-11-28 02:32:42 +00:00
|
|
|
#- { name: 'kernel.sysrq', value: '1' } # OS values differ, Ok?
|
2020-11-28 01:51:51 +00:00
|
|
|
- { name: 'kernel.core_uses_pid', value: '1' }
|
2020-11-28 02:32:42 +00:00
|
|
|
#- { name: 'net.ipv4.tcp_syncookies', value: '1' } # Very standard in 2020
|
2020-11-28 01:51:51 +00:00
|
|
|
#- { name: 'kernel.shmmax', value: '268435456' } # OS values differ, Ok?
|
|
|
|
- { name: 'net.ipv6.conf.all.disable_ipv6', value: '1' } # IPv6 disabled
|
|
|
|
#- { name: 'net.ipv6.conf.default.disable_ipv6', value: '1' } # AUTO-SET
|
|
|
|
#- { name: 'net.ipv6.conf.lo.disable_ipv6', value: '1' } # BY ABOVE
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2020-01-12 01:28:47 +00:00
|
|
|
- name: Install /etc/profile.d/zzz_iiab.sh from template, to add sbin dirs to unprivileged users' $PATH
|
2018-02-13 02:29:06 +00:00
|
|
|
template:
|
2018-10-31 01:52:02 +00:00
|
|
|
dest: /etc/profile.d/zzz_iiab.sh
|
2018-02-13 02:29:06 +00:00
|
|
|
src: zzz_iiab.sh
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2017-10-31 03:55:24 +00:00
|
|
|
- include_tasks: net_mods.yml
|
2017-05-27 23:10:45 +00:00
|
|
|
when: not is_debuntu and not is_F18
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2017-11-24 16:57:46 +00:00
|
|
|
- include_tasks: iiab-startup.yml
|
|
|
|
|
2017-10-30 20:31:16 +00:00
|
|
|
- name: Recording STAGE 2 HAS COMPLETED ==========================
|
2018-02-13 02:29:06 +00:00
|
|
|
lineinfile:
|
2020-02-04 00:54:04 +00:00
|
|
|
path: "{{ iiab_env_file }}"
|
2018-02-13 02:51:08 +00:00
|
|
|
regexp: '^STAGE=*'
|
|
|
|
line: 'STAGE=2'
|