| |
@@ -34,6 +34,21 @@
|
| |
retries: 5
|
| |
delay: 10
|
| |
until: result is succeeded
|
| |
+ when: ansible_user_id == 'root'
|
| |
+
|
| |
+ - block:
|
| |
+ - name: Check if required packages are installed on the system
|
| |
+ command: rpm -q {{ item }}
|
| |
+ ignore_errors: True
|
| |
+ register: rpm_result
|
| |
+ with_items:
|
| |
+ - rpm-build
|
| |
+
|
| |
+ - fail:
|
| |
+ msg: "Some of the required packages were not found on the localhost: {{ rpm_result.results[0].stdout }}"
|
| |
+ when: rpm_result.failed == true
|
| |
+
|
| |
+ when: ansible_user_id != 'root'
|
| |
|
| |
- name: Get the specfile package name
|
| |
shell: rpm -q --specfile --queryformat="%{NAME}\n" {{pkgdir}}/*.spec | head -n1
|
| |
Without this patch, people running STR against a remote machine
without root cannot use this role ...
NOTE: This patch is an exception to STI by the OSCI team. All fixes
like this need to be approved for inclusion, as they are not compliant
to STI.
Signed-off-by: Miroslav Vadkerti mvadkert@redhat.com