retrace: deal with exit code 1 when record is already presented
This commit is contained in:
parent
eb87f99f85
commit
644d34d4be
1 changed files with 3 additions and 2 deletions
|
@ -61,8 +61,9 @@
|
||||||
line: ' MORE_SATYR = "https://github.com/abrt/satyr/"'
|
line: ' MORE_SATYR = "https://github.com/abrt/satyr/"'
|
||||||
notify: restart httpd
|
notify: restart httpd
|
||||||
|
|
||||||
|
# the magic with ! is that it return exit code 1 if ERROR is present in output
|
||||||
- name: add repositories
|
- name: add repositories
|
||||||
command: faf repoadd "{{ item.name }}" yum "{{ item.url }}"
|
command: ! faf repoadd "{{ item.name }}" yum "{{ item.url }}" | grep ERROR
|
||||||
become: yes
|
become: yes
|
||||||
become_user: faf
|
become_user: faf
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
@ -71,7 +72,7 @@
|
||||||
with_items: "{{ faf_repos }}"
|
with_items: "{{ faf_repos }}"
|
||||||
|
|
||||||
- name: repoassign repositories
|
- 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: yes
|
||||||
become_user: faf
|
become_user: faf
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue