---
-
-- when: ansible_distribution_release in ['trixie', 'sid']
- ansible.builtin.set_fact:
- docker_upstream: false
-- ansible.builtin.set_fact:
- docker_packages: "{{docker_upstream|ternary(docker_upstream_packages, lookup('vars', 'docker_' + ansible_distribution + '_packages', default=[]))}}"
-- when: docker_upstream
- block:
- - name: Add upstream docker apt key
- ansible.builtin.apt_key:
- url: 'https://download.docker.com/linux/debian/gpg'
- - name: Add upstream docker sources
- when: ansible_distribution == 'Debian'
- ansible.builtin.apt_repository:
- filename: 'docker'
- repo: "deb https://download.docker.com/linux/debian {{ansible_distribution_release}} stable"
+- name: Include OS-specific variables
+ ansible.builtin.include_vars: "{{item}}"
+ with_first_found:
+ - files:
+ - "{{ansible_distribution}}-{{ansible_distribution_major_version}}.yml"
+ - "{{ansible_distribution}}-{{ansible_distribution_release}}.yml"
+ - "{{ansible_distribution}}.yml"
+ - "{{ansible_os_family}}.yml"
+ skip: true
+- name: OS-specific setup
+ ansible.builtin.include_tasks: "{{item}}"
+ with_first_found:
+ - files:
+ - "setup-{{ansible_os_family}}.yml"
+ skip: true
- name: Deploy docker network configuration
block:
- name: Create docker configuration directory
--- /dev/null
+---
+- when: ansible_distribution_release in ['trixie', 'sid']
+ ansible.builtin.set_fact:
+ docker_upstream: false
+- ansible.builtin.set_fact:
+ docker_packages: "{{docker_upstream|ternary(docker_upstream_packages, lookup('vars', 'docker_' + ansible_distribution + '_packages', default=[]))}}"
+- when: docker_upstream
+ block:
+ - name: Add upstream docker apt key
+ ansible.builtin.apt_key:
+ url: 'https://download.docker.com/linux/debian/gpg'
+ - name: Add upstream docker sources
+ when: ansible_distribution == 'Debian'
+ ansible.builtin.apt_repository:
+ filename: 'docker'
+ repo: "deb https://download.docker.com/linux/debian {{ansible_distribution_release}} stable"
--- /dev/null
+---
+
+- name: Add SLES products
+ when: ansible_distribution == 'SLES'
+ ansible.builtin.command:
+ argv: ['suseconnect', '-p', "{{product}}/{{ansible_distribution_version}}/{{ansible_architecture}}"]
+ loop: "{{docker_sles_products|default([])}}"
+ loop_control:
+ loop_var: product
+
+- ansible.builtin.set_fact:
+ docker_packages: "{{docker_SLES_packages}}"