]> git.lttng.org Git - lttng-ci.git/commitdiff
ansible: Switch SLES product registrations to use common task
authorKienan Stewart <kstewart@efficios.com>
Wed, 14 Feb 2024 20:45:48 +0000 (15:45 -0500)
committerKienan Stewart <kstewart@efficios.com>
Wed, 14 Feb 2024 20:51:02 +0000 (15:51 -0500)
Change-Id: Ide81884d4bf64e61f0d824668455d78235715c71
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
automation/ansible/roles/common/tasks/setup-Suse.yml
automation/ansible/roles/developer/tasks/setup-Suse.yml

index 23b681b9de3332908e58ea33dd5800ced45d5c2e..a35ee7bded4b8a1cc71f701d8b3c28f90daefc80 100644 (file)
 
 - name: Connect SLES Repo
   when: ansible_distribution == 'SLES'
-  ansible.builtin.command:
-    argv: ['suseconnect', '-p', "{{item}}/{{ansible_distribution_version}}/{{ansible_architecture}}"]
-  with_items: "{{common_sles_connect_repos}}"
+  include_role:
+    name: suse
+    tasks_from: product
+  loop: "{{common_sles_connect_repos}}"
+  loop_control:
+    loop_var: 'product'
 
 - name: Ensure common patterns are installed.
   zypper: "name={{ common_patterns }} type=pattern state=present update_cache=yes"
index 1373dff38b595e678e3f9b74e463529b2b50dd5b..bda46e9f438e195975827f88219de9285af56829 100644 (file)
@@ -2,6 +2,9 @@
 
 - name: Activate required products
   when: ansible_distribution == 'SLES'
-  ansible.builtin.command:
-    argv: ['suseconnect', '-p', "{{item}}/{{ansible_distribution_version}}/{{ansible_architecture}}"]
-  with_items: "{{developer_sles_products|default([])}}"
+  include_role:
+    name: suse
+    tasks_from: product
+  loop: "{{developer_sles_products|default([])}}"
+  loop_control:
+    loop_var: 'product'
This page took 0.025752 seconds and 4 git commands to generate.