From d7fdb4c4c24d2d692f73330718a6e6ff29559a07 Mon Sep 17 00:00:00 2001 From: Ben Partridge Date: Thu, 28 Nov 2019 15:29:44 +1100 Subject: [PATCH 1/6] Suppress emoji and standard output when calling pipenv as it outputs characters in non-ascii which causes errors in cloud-init --- bin/install-ansible | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/install-ansible b/bin/install-ansible index 196562e..d50f943 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -20,7 +20,8 @@ fi export PATH=/usr/local/bin:$PATH pip3 install pipenv -pipenv sync +echo "Installing ansible and dependencies..." +PIPENV_HIDE_EMOJIS=1 pipenv sync >/dev/null if [[ $1 == "--dev" ]]; then pipenv sync --dev From 14465e259f3e6643b8f63e035660eb841996f2fa Mon Sep 17 00:00:00 2001 From: Ben Partridge Date: Thu, 28 Nov 2019 16:23:48 +1100 Subject: [PATCH 2/6] Redirect all logs to dev/null when running pipenv sync --- bin/install-ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install-ansible b/bin/install-ansible index d50f943..6d3d349 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -21,7 +21,7 @@ export PATH=/usr/local/bin:$PATH pip3 install pipenv echo "Installing ansible and dependencies..." -PIPENV_HIDE_EMOJIS=1 pipenv sync >/dev/null +PIPENV_HIDE_EMOJIS=1 pipenv sync 2>1 >/dev/null if [[ $1 == "--dev" ]]; then pipenv sync --dev From 843f1c26e73fbe1b2ac44daf269f0f1155e0bb4a Mon Sep 17 00:00:00 2001 From: Ben Partridge Date: Thu, 28 Nov 2019 16:30:35 +1100 Subject: [PATCH 3/6] Revert "Redirect all logs to dev/null when running pipenv sync" This reverts commit 14465e259f3e6643b8f63e035660eb841996f2fa. --- bin/install-ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install-ansible b/bin/install-ansible index 6d3d349..d50f943 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -21,7 +21,7 @@ export PATH=/usr/local/bin:$PATH pip3 install pipenv echo "Installing ansible and dependencies..." -PIPENV_HIDE_EMOJIS=1 pipenv sync 2>1 >/dev/null +PIPENV_HIDE_EMOJIS=1 pipenv sync >/dev/null if [[ $1 == "--dev" ]]; then pipenv sync --dev From 32bfef040cccd65b5922beb40dd86145776c9972 Mon Sep 17 00:00:00 2001 From: Ben Partridge Date: Thu, 28 Nov 2019 16:41:34 +1100 Subject: [PATCH 4/6] Force no spinner when running pipenv sync --- bin/install-ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install-ansible b/bin/install-ansible index d50f943..bf76d24 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -21,7 +21,7 @@ export PATH=/usr/local/bin:$PATH pip3 install pipenv echo "Installing ansible and dependencies..." -PIPENV_HIDE_EMOJIS=1 pipenv sync >/dev/null +PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv sync if [[ $1 == "--dev" ]]; then pipenv sync --dev From 5490651e9ef44cd41d048fbb558047fff6fd5215 Mon Sep 17 00:00:00 2001 From: Ben Partridge Date: Fri, 29 Nov 2019 10:32:41 +1100 Subject: [PATCH 5/6] DCD-800: Use iconv to strip non-ascii characters --- bin/install-ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install-ansible b/bin/install-ansible index bf76d24..0a5ea5f 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -21,7 +21,7 @@ export PATH=/usr/local/bin:$PATH pip3 install pipenv echo "Installing ansible and dependencies..." -PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv sync +PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv sync | iconv -c -f utf-8 -t ascii if [[ $1 == "--dev" ]]; then pipenv sync --dev From 45e357fdd203c41cdb1b05835a5a82cd40497582 Mon Sep 17 00:00:00 2001 From: Ben Partridge Date: Fri, 29 Nov 2019 10:55:20 +1100 Subject: [PATCH 6/6] DCD-800: pipe stderr to iconv as well as stdout --- bin/install-ansible | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install-ansible b/bin/install-ansible index 0a5ea5f..57a1878 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -21,7 +21,7 @@ export PATH=/usr/local/bin:$PATH pip3 install pipenv echo "Installing ansible and dependencies..." -PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv sync | iconv -c -f utf-8 -t ascii +PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv sync 2>&1 | iconv -c -f utf-8 -t ascii if [[ $1 == "--dev" ]]; then pipenv sync --dev