retrace: deal with exit code 1 when record is already presented

This commit is contained in:
Miroslav Suchý 2017-10-05 15:29:17 +02:00
parent eb87f99f85
commit 644d34d4be

View file

@ -61,8 +61,9 @@
line: ' MORE_SATYR = "https://github.com/abrt/satyr/"'
notify: restart httpd
# the magic with ! is that it return exit code 1 if ERROR is present in output
- name: add repositories
command: faf repoadd "{{ item.name }}" yum "{{ item.url }}"
command: ! faf repoadd "{{ item.name }}" yum "{{ item.url }}" | grep ERROR
become: yes
become_user: faf
ignore_errors: yes
@ -71,7 +72,7 @@
with_items: "{{ faf_repos }}"
- name: repoassign repositories
command: faf repoassign "{{ item.name }}" "{{ item.opsys }}" "{{ item.arch }}"
command: ! faf repoassign "{{ item.name }}" "{{ item.opsys }}" "{{ item.arch }}" | grep ERROR
become: yes
become_user: faf
ignore_errors: yes