Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Pardus] Support ansible testcases for Pardus 21.x #495

Merged
merged 6 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This project supports below scenarios for end-to-end guest operating system vali
| Fedora Server 36 and later | :heavy_check_mark: | | :heavy_check_mark: |
| ProLinux Server 7.9, 8.5 | :heavy_check_mark: | | :heavy_check_mark: |
| FreeBSD 13 and later | :heavy_check_mark: | | :heavy_check_mark: |
| Pardus 21.2 Server,XFCE Desktop and later (*) | :heavy_check_mark: | | |
| Pardus 21.2 Server,XFCE Desktop and later | :heavy_check_mark: | | :heavy_check_mark: |
| openSUSE Leap 15.3 and later | :heavy_check_mark: | | :heavy_check_mark: |
| BCLinux 8.x | :heavy_check_mark: | | :heavy_check_mark: |
| BCLinux-for-Euler 21.10 | :heavy_check_mark: | | :heavy_check_mark: |
Expand Down
2 changes: 1 addition & 1 deletion autoinstall/Pardus/preseed.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ d-i preseed/late_command string \
echo "Install openssh-server ..." > /target/dev/ttyS0; \
chroot /target apt-get install -y --no-upgrade openssh-server > /dev/ttyS0; \
echo "Install packages ..." > /target/dev/ttyS0; \
chroot /target apt-get install -y --force-yes build-essential open-vm-tools sg3-utils vim > /dev/ttyS0; \
chroot /target apt-get install -y --force-yes build-essential open-vm-tools sg3-utils vim perl python3-apt dbus > /dev/ttyS0; \
if [ -f "/target/usr/bin/Xorg" ];\
then\
echo "Install package open-vm-tools-desktop ..." > /target/dev/ttyS0;\
Expand Down
9 changes: 5 additions & 4 deletions linux/network_device_ops/apply_new_network_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@
network_config_template: rhel_network_conf.j2
when: guest_os_family == "RedHat"

- name: "Set fact of the network config template for Ubuntu desktop"
- name: "Set fact of the network config template for {{ guest_os_ansible_distribution }}"
ansible.builtin.set_fact:
network_config_template: debian_network_conf.j2
when: >
(guest_os_ansible_distribution == "Debian") or
(guest_os_ansible_distribution == "Pardus GNU/Linux") or
(guest_os_ansible_distribution == "Ubuntu" and
guest_os_with_gui is defined and guest_os_with_gui)

Expand All @@ -109,6 +110,9 @@
when: guest_os_family == "FreeBSD"

- name: "Create or update network config file for new network interface"
when:
- network_config_template
- network_config_path
block:
- name: "Create or update network config file '{{ network_config_path }}'"
ansible.builtin.template:
Expand All @@ -125,9 +129,6 @@

- name: "Print content of network config file '{{ network_config_path }}'"
ansible.builtin.debug: var=network_config.stdout_lines
when:
- network_config_template
- network_config_path

- name: "Apply new netplan configuration file in Ubuntu server"
when:
Expand Down
7 changes: 4 additions & 3 deletions linux/utils/get_network_config_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@
network_config_path: "/etc/network/interfaces"
when: >
(guest_os_ansible_distribution == "Debian") or
(guest_os_ansible_distribution == "Pardus GNU/Linux") or
(guest_os_ansible_distribution == "Ubuntu" and
guest_os_with_gui is defined and guest_os_with_gui)

- name: "Set fact of network config file in Ubuntu server"
when:
- guest_os_ansible_distribution == "Ubuntu"
- guest_os_with_gui is defined and not guest_os_with_gui
block:
- name: "Get netplan config file in Ubuntu server"
include_tasks: ../utils/get_netplan_config_file.yml
Expand All @@ -61,9 +65,6 @@
ansible.builtin.set_fact:
network_config_path: "{{ netplan_config_file }}"
when: netplan_config_file is defined
when:
- guest_os_ansible_distribution == "Ubuntu"
- guest_os_with_gui is defined and not guest_os_with_gui

- name: "Set fact of network config file for '{{ network_adapter_name }}' on SLE"
ansible.builtin.set_fact:
Expand Down
14 changes: 7 additions & 7 deletions linux/utils/get_network_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
- name: "{{ guest_os_ansible_distribution }} {{ guest_os_ansible_distribution_ver }} network device manager is traditional ifdown/ifup"
ansible.builtin.set_fact:
guest_os_network_manager: "traditional"
when: guest_os_ansible_distribution == "Debian"
when: guest_os_ansible_distribution in ["Debian", "Pardus GNU/Linux"]

- name: "Set network device manager for {{ guest_os_ansible_distribution }}"
when: guest_os_ansible_distribution not in ["Debian", "FreeBSD"]
when: guest_os_ansible_distribution not in ["Debian", "FreeBSD", "Pardus GNU/Linux"]
block:
- include_tasks: get_service_info.yml
vars:
Expand All @@ -31,6 +31,10 @@
- service_info.state in ['active', 'running']

- name: "Set network device manager for guest OS which doesn't have NetworkManager"
when: >
(not service_info or
service_info.state is undefined or
service_info.state not in ['active', 'running'])
block:
# SLES uses netplan to manage network interfaces
- name: "{{ guest_os_ansible_distribution }} {{ guest_os_ansible_distribution_ver }} network device manager is wicked"
Expand All @@ -54,11 +58,7 @@
- name: "{{ guest_os_ansible_distribution }} {{ guest_os_ansible_distribution_ver }} network device manager is systemd-networkd"
ansible.builtin.set_fact:
guest_os_network_manager: "systemd-networkd"
when: guest_os_ansible_distribution in ['VMware Photon OS', 'Flatcar']
when: >
(not service_info or
service_info.state is undefined or
service_info.state not in ['active', 'running'])
when: guest_os_ansible_distribution in ['VMware Photon OS', 'Flatcar']

- name: "Set network device manager for {{ guest_os_ansible_distribution }}"
ansible.builtin.set_fact:
Expand Down