From 3b787123e373e31f2cf20d105633d00237175825 Mon Sep 17 00:00:00 2001 From: Erwan Miran Date: Sat, 20 Oct 2018 16:13:54 +0200 Subject: [PATCH] Fix tasks to avoid ansible warning about raw module environment (#3545) --- roles/bootstrap-os/tasks/bootstrap-coreos.yml | 1 + roles/bootstrap-os/tasks/bootstrap-debian.yml | 2 ++ roles/bootstrap-os/tasks/bootstrap-fedora.yml | 2 ++ roles/bootstrap-os/tasks/bootstrap-ubuntu.yml | 3 ++- roles/bootstrap-os/tasks/main.yml | 1 + roles/download/tasks/download_prep.yml | 1 + roles/download/tasks/set_docker_image_facts.yml | 1 + 7 files changed, 10 insertions(+), 1 deletion(-) diff --git a/roles/bootstrap-os/tasks/bootstrap-coreos.yml b/roles/bootstrap-os/tasks/bootstrap-coreos.yml index ef82b7bde..d4fad92b5 100644 --- a/roles/bootstrap-os/tasks/bootstrap-coreos.yml +++ b/roles/bootstrap-os/tasks/bootstrap-coreos.yml @@ -2,6 +2,7 @@ - name: Bootstrap | Check if bootstrap is needed raw: stat /opt/bin/.bootstrapped register: need_bootstrap + environment: {} failed_when: false changed_when: false tags: diff --git a/roles/bootstrap-os/tasks/bootstrap-debian.yml b/roles/bootstrap-os/tasks/bootstrap-debian.yml index 959ad0e03..07797cc55 100644 --- a/roles/bootstrap-os/tasks/bootstrap-debian.yml +++ b/roles/bootstrap-os/tasks/bootstrap-debian.yml @@ -10,12 +10,14 @@ - python - pip - dbus-daemon + environment: {} tags: facts - name: Bootstrap | Install python 2.x, pip, and dbus raw: apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y python-minimal python-pip dbus + environment: {} when: need_bootstrap.results | map(attribute='rc') | sort | last | bool diff --git a/roles/bootstrap-os/tasks/bootstrap-fedora.yml b/roles/bootstrap-os/tasks/bootstrap-fedora.yml index 1cdad6eca..f17d32adf 100644 --- a/roles/bootstrap-os/tasks/bootstrap-fedora.yml +++ b/roles/bootstrap-os/tasks/bootstrap-fedora.yml @@ -7,10 +7,12 @@ changed_when: false with_items: - python + environment: {} tags: facts - name: Install python on fedora raw: "dnf install --assumeyes --quiet python" + environment: {} when: need_bootstrap.results | map(attribute='rc') | sort | last | bool - name: Install required python packages diff --git a/roles/bootstrap-os/tasks/bootstrap-ubuntu.yml b/roles/bootstrap-os/tasks/bootstrap-ubuntu.yml index 9c088b2c7..5d2050b6d 100644 --- a/roles/bootstrap-os/tasks/bootstrap-ubuntu.yml +++ b/roles/bootstrap-os/tasks/bootstrap-ubuntu.yml @@ -15,7 +15,7 @@ failed_when: false changed_when: false with_items: "{{ubuntu_packages}}" - + environment: {} tags: - facts @@ -23,6 +23,7 @@ raw: apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y {{ubuntu_packages | join(" ")}} + environment: {} when: - need_bootstrap.results | map(attribute='rc') | sort | last | bool diff --git a/roles/bootstrap-os/tasks/main.yml b/roles/bootstrap-os/tasks/main.yml index 2c42f2d66..f2d441ad5 100644 --- a/roles/bootstrap-os/tasks/main.yml +++ b/roles/bootstrap-os/tasks/main.yml @@ -3,6 +3,7 @@ raw: cat /etc/os-release register: os_release changed_when: false + environment: {} - name: Set bootstrap_os set_fact: diff --git a/roles/download/tasks/download_prep.yml b/roles/download/tasks/download_prep.yml index b44da45da..0cb46f35f 100644 --- a/roles/download/tasks/download_prep.yml +++ b/roles/download/tasks/download_prep.yml @@ -7,6 +7,7 @@ failed_when: false changed_when: false check_mode: no + environment: {} when: download_container - name: container_download | Create dest directory for saved/loaded container images diff --git a/roles/download/tasks/set_docker_image_facts.yml b/roles/download/tasks/set_docker_image_facts.yml index 87a73cfbd..b40f649c9 100644 --- a/roles/download/tasks/set_docker_image_facts.yml +++ b/roles/download/tasks/set_docker_image_facts.yml @@ -15,6 +15,7 @@ failed_when: false changed_when: false check_mode: no + environment: {} when: not download_always_pull - set_fact: