docker is provided by the `sle-module-containers/12/x86_64` not
`sle-module-containers/12.5/x86_64` on SLES12 SP5.
Change-Id: Id4c2596f0954839ca8baaf0be8661c09790a8774
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
- name: Add SLES products
when: ansible_distribution == 'SLES'
- ansible.builtin.command:
- argv: ['suseconnect', '-p', "{{product}}/{{ansible_distribution_version}}/{{ansible_architecture}}"]
+ include_role:
+ name: suse
+ tasks_from: product
loop: "{{docker_sles_products|default([])}}"
loop_control:
loop_var: product
--- /dev/null
+---
+
+- name: Connect product using full version
+ ansible.builtin.command:
+ argv: ['suseconnect', '-p', "{{product}}/{{ansible_distribution_version}}/{{ansible_architecture}}"]
+ register: connect
+ ignore_errors: true
+# Some products don't use the full version, but only the major version
+- name: Connect production using major version
+ when: connect.rc != 0
+ ansible.builtin.command:
+ argv: ['suseconnect', '-p', "{{product}}/{{ansible_distribution_major_version}}/{{ansible_architecture}}"]