update..
This commit is contained in:
@ -26,6 +26,7 @@
|
||||
- apt-compiler-pkgs
|
||||
- apt-webserver-pkgs
|
||||
|
||||
|
||||
- name: (apt.yml) dpkg --configure
|
||||
command: >
|
||||
dpkg --configure -a
|
||||
@ -41,6 +42,7 @@
|
||||
- apt-compiler-pkgs
|
||||
- apt-webserver-pkgs
|
||||
|
||||
|
||||
- name: (apt.yml) apt upgrade
|
||||
apt:
|
||||
upgrade: "{{ apt_upgrade_type }}"
|
||||
@ -54,17 +56,19 @@
|
||||
- apt-compiler-pkgs
|
||||
- apt-webserver-pkgs
|
||||
|
||||
|
||||
- name: (apt.yml) Initial install debian packages (stretch)
|
||||
apt:
|
||||
name: "{{ apt_initial_install_stretch }}"
|
||||
state: "{{ apt_install_state }}"
|
||||
when:
|
||||
- - apt_initial_install_stretch is defined and apt_initial_install_stretch|length > 0
|
||||
- apt_initial_install_stretch is defined and apt_initial_install_stretch|length > 0
|
||||
- ansible_facts['distribution'] == "Debian"
|
||||
- ansible_facts['distribution_major_version'] == "9"
|
||||
tags:
|
||||
- apt-initial-install
|
||||
|
||||
|
||||
- name: (apt.yml) Initial install debian packages (buster)
|
||||
apt:
|
||||
name: "{{ apt_initial_install_buster }}"
|
||||
@ -76,6 +80,7 @@
|
||||
tags:
|
||||
- apt-initial-install
|
||||
|
||||
|
||||
- name: (apt.yml) Initial install debian packages (bullseye)
|
||||
apt:
|
||||
name: "{{ apt_initial_install_bullseye }}"
|
||||
@ -87,6 +92,7 @@
|
||||
tags:
|
||||
- apt-initial-install
|
||||
|
||||
|
||||
- name: (apt.yml) Initial install ubuntu packages (bionic)
|
||||
apt:
|
||||
name: "{{ apt_initial_install_bionic }}"
|
||||
@ -107,6 +113,11 @@
|
||||
tags:
|
||||
- apt-initial-install
|
||||
|
||||
|
||||
# ---
|
||||
# Microcode
|
||||
# ---
|
||||
|
||||
- name: (apt.yml) Ensure we have CPU microcode from backports (debian stretch)
|
||||
apt:
|
||||
name: "{{ microcode_package }}"
|
||||
@ -120,6 +131,7 @@
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
|
||||
|
||||
- name: (apt.yml) Install CPU microcode (debian buster/bullseye)
|
||||
apt:
|
||||
name: "{{ microcode_package }}"
|
||||
@ -133,6 +145,7 @@
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
|
||||
|
||||
- name: (apt.yml) Install CPU microcode (ubuntu bionic)
|
||||
apt:
|
||||
name: "{{ microcode_package }}"
|
||||
@ -146,6 +159,7 @@
|
||||
- apt-initial-install
|
||||
- apt-microcode
|
||||
|
||||
|
||||
- name: (apt.yml) Install CPU microcode (ubuntu xenial)
|
||||
apt:
|
||||
name: "{{ microcode_package }}"
|
||||
|
@ -6,3 +6,10 @@
|
||||
state: present
|
||||
update_cache: yes
|
||||
cache_valid_time: 86400
|
||||
|
||||
|
||||
- name: Enable service systemd-resolved
|
||||
ansible.builtin.systemd:
|
||||
name: systemd-resolved
|
||||
enabled: yes
|
||||
masked: no
|
||||
|
@ -3,7 +3,7 @@
|
||||
{# {% for config in network_interfaces %} #}
|
||||
{% for config in item.1 %}
|
||||
|
||||
{% if config.headline is defined %}
|
||||
{% if config.headline is defined and config.headline %}
|
||||
#-----------------------------
|
||||
# {{ config.headline }}
|
||||
#-----------------------------
|
||||
@ -18,10 +18,10 @@ allow-{{ stanza }}
|
||||
{% endfor -%}
|
||||
iface {{ config.device }} {{ config.family | default('inet', true) }} {{ config.method | default('static', true) }}
|
||||
{% if config.method == "static" %}
|
||||
{% if config.description is defined %}
|
||||
{% if (config.description is defined and config.description) %}
|
||||
description {{ config.description }}
|
||||
{% endif %}
|
||||
{% if config.hwaddress is defined %}
|
||||
{% if config.hwaddress is defined and config.hwaddress %}
|
||||
hwaddress {{ config.hwaddress }}
|
||||
{% endif %}
|
||||
{% if (config.address is defined) and (0 < config.address | length) %}
|
||||
@ -33,28 +33,28 @@ iface {{ config.device }} {{ config.family | default('inet', true) }} {{ config.
|
||||
{% endif -%}
|
||||
{% set iface_keys = ['gateway', 'metric', 'pointopoint', 'mtu', 'scope'] %}
|
||||
{% for key in iface_keys %}
|
||||
{% if key in config %}
|
||||
{% if key in config and config[key] %}
|
||||
{{ key }} {{ config[key] }}
|
||||
{% endif %}
|
||||
{% endfor -%}
|
||||
{% elif config.method == "manual" %}
|
||||
{% set iface_keys = ['hwaddress', 'mtu'] %}
|
||||
{% for key in iface_keys %}
|
||||
{% if key in config %}
|
||||
{% if key in config and config[key] %}
|
||||
{{ key }} {{ config[key] }}
|
||||
{% endif %}
|
||||
{% endfor -%}
|
||||
{% elif config.method == "dhcp" %}
|
||||
{% set iface_keys = ['hwaddress', 'hostname', 'metric', 'leasehours', 'vendor', 'client' ] %}
|
||||
{% for key in iface_keys %}
|
||||
{% if key in config %}
|
||||
{% if key in config and config[key] %}
|
||||
{{ key }} {{ config[key] }}
|
||||
{% endif %}
|
||||
{% endfor -%}
|
||||
{% elif config.method == "bootp" %}
|
||||
{% set iface_keys = ['hwaddr', 'bootfile', 'server'] %}
|
||||
{% for key in iface_keys %}
|
||||
{% if key in config %}
|
||||
{% if key in config and config[key] %}
|
||||
{{ key }} {{ config[key] }}
|
||||
{% endif %}
|
||||
{% endfor -%}
|
||||
@ -62,15 +62,20 @@ iface {{ config.device }} {{ config.family | default('inet', true) }} {{ config.
|
||||
|
||||
{# #}
|
||||
{# nameservers #}
|
||||
{%- if (config.nameservers is defined) and (0 < config.nameservers | length) %}
|
||||
{%- if (config.nameservers is defined and config.nameservers) or (config.search is defined and config.search) %}
|
||||
# dns-* options are implemented by the resolvconf package, if installed
|
||||
# sets entries in /etc/resolv.conf
|
||||
#
|
||||
dns-nameservers {{ config.nameservers | join(' ') }}
|
||||
|
||||
{% endif -%}
|
||||
{% if config.search is defined and config.search %}
|
||||
dns-search {{ config.search }}
|
||||
{% endif -%}
|
||||
{%- if (config.nameservers is defined) and config.nameservers %}
|
||||
{% for _ip in config.nameservers %}
|
||||
dns-nameserver {{ _ip }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if config.dns_search is defined %}
|
||||
dns-search {{ config.dns_search }}
|
||||
{%- if (config.nameservers is defined and config.nameservers) or (config.search is defined and config.search) %}
|
||||
|
||||
{% endif -%}
|
||||
{# #}
|
||||
|
Reference in New Issue
Block a user