mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-22 10:37:52 +00:00
29 lines
947 B
YAML
29 lines
947 B
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
- name: Set version specific variables
|
|
include_vars: "{{ item }}"
|
|
with_first_found:
|
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
|
|
- "{{ ansible_distribution }}.yml"
|
|
- "{{ ansible_os_family }}.yml"
|
|
- "default.yml"
|
|
|
|
- name: Install packages
|
|
package:
|
|
name: "{{ network_packages }}"
|
|
state: present
|
|
|
|
- name: Enable network service
|
|
service:
|
|
name: "{{ network_service_name }}"
|
|
state: started
|
|
enabled: yes
|
|
|
|
- name: Configure networking connection profiles
|
|
network_connections:
|
|
provider: "{{ network_provider | mandatory }}"
|
|
ignore_errors: "{{ network_ignore_errors | default(omit) }}"
|
|
force_state_change: "{{ network_force_state_change | default(omit) }}"
|
|
connections: "{{ network_connections | default([]) }}"
|
|
|
|
- name: Re-test connectivity
|
|
ping:
|