From 89863f300646973ae3c2f2f248e1dcb6a2309540 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Mar 08 2019 16:45:52 +0000 Subject: Less variable, more simple. --- diff --git a/README.md b/README.md index c589b53..1ac288a 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,6 @@ bootstrap_wait_for_host: no # The number of seconds you want to wait during connection test before failing. bootstrap_timeout: 3 -# The number of retries you want tasks to do before failing. -bootstrap_retries: 3 - # To update all packages installed by this roles, set `bootstrap_package_state` to `latest`. bootstrap_package_state: present diff --git a/defaults/main.yml b/defaults/main.yml index 491cdad..6814e62 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -14,8 +14,5 @@ bootstrap_wait_for_host: no # The number of seconds you want to wait during connection test before failing. bootstrap_timeout: 3 -# The number of retries you want tasks to do before failing. -bootstrap_retries: 3 - # To update all packages installed by this roles, set `bootstrap_package_state` to `latest`. bootstrap_package_state: present diff --git a/tasks/main.yml b/tasks/main.yml index f831cd7..f02b98a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -90,7 +90,7 @@ changed_when: - "'Installing' in apkresult.stdout" until: apkresult is succeeded - retries: "{{ bootstrap_retries }}" + retries: 3 - name: install software with apt-get raw: "apt-get update ; apt-get -y install {{ bootstrap_apt_packages }}" @@ -101,7 +101,7 @@ changed_when: - "' 0 newly installed' not in apt_getresult.stdout" until: apt_getresult is succeeded - retries: "{{ bootstrap_retries }}" + retries: 3 - name: install software with dnf raw: "dnf -y install {{ bootstrap_dnf_packages }}" @@ -111,7 +111,7 @@ changed_when: - "'Nothing' not in dnfresult.stdout" until: dnfresult is succeeded - retries: "{{ bootstrap_retries }}" + retries: 3 - name: install software with emerge raw: "{{ bootstrap_emerge_command }}" @@ -121,7 +121,7 @@ changed_when: - "'changed' in emergeresult.stdout" until: emergeresult is succeeded - retries: "{{ bootstrap_retries }}" + retries: 3 - name: install software with pacman raw: "pacman -Sy ; pacman -T {{ bootstrap_pacman_packages }} || pacman -S --noconfirm {{ bootstrap_pacman_packages }}" @@ -131,7 +131,7 @@ changed_when: - "' installing python' in pacmanresult.stdout" until: pacmanresult is succeeded - retries: "{{ bootstrap_retries }}" + retries: 3 - name: install software with pkg raw: > @@ -145,7 +145,7 @@ changed_when: - "'Extracting python' in pkgresult.stdout" until: pkgresult is succeeded - retries: "{{ bootstrap_retries }}" + retries: 3 - name: install software with pkg_add raw: pkg_add -Iz {{ bootstrap_pkg_add_packages }} @@ -155,7 +155,7 @@ changed_when: - "': ok' in pkg_add_getresult.stdout" until: pkg_add_getresult is succeeded - retries: "{{ bootstrap_retries }}" + retries: 3 - name: install software with yum raw: "yum -y install {{ bootstrap_yum_packages }}" @@ -165,7 +165,7 @@ changed_when: - "'Nothing' not in yumresult.stdout" until: yumresult is succeeded - retries: "{{ bootstrap_retries }}" + retries: 3 - name: install software with zypper raw: "zypper -n install {{ bootstrap_zypper_packages }}" @@ -176,7 +176,7 @@ - "'Nothing' not in zypperresult.stdout" failed_when: no until: zypperresult is succeeded - retries: "{{ bootstrap_retries }}" + retries: 3 - name: gather facts setup: