This is a tricky one. Let me try to summarize.
- Playbook manages entire OS for Debian desktop devices
- Playbook in question upgrades target hosts from Debian 8 to 9. Several
asyncs are used throughout.
- Runs about a dozen different roles after the dist-upgrade without problems
- At a specific point, all modules fail with
_is_text_encoding=False error.
- Rerunning the exact playbook afterwards does not trigger the issue.
This play still works:
- name: Install OS package dependancies
apt: pkg={{ item }} state=present
retries: 4
delay: 15
with_items:
- libudev-dev
- libjson-c-dev
- libcurl4-gnutls-dev
- node-colors
- node-request
- nodejs
tags: domotica
And then this right after fails with above error:
- name: Install npm packages block
block:
- name: Install npm packages with npm module
npm: path="/home/{{ domotica_user }}/domotica" ignore_scripts=yes
become: yes
become_user: "{{ domotica_user }}"
rescue:
- name: Install npm packages with command line
command: npm install --ignore-scripts
args:
chdir: "/home/{{ domotica_user }}/domotica"
become: yes
become_user: "{{ domotica_user }}"
tags: domotica
Both npm and command fail with the same error. I first thought it was an npm module issue, but evidently it's not.
The host executing the play runs Debian sid, and as mentioned the target host runs Debian 8 at the start of the play and then is upgraded during the play.
Unfortunately the only way I can reproduce this, is by instantiating one of those Debian 8 desktops and then executing this entire upgrade play (takes 30mins-2hrs depending on download speed and target host cpu). I haven't been able to reproduce in any other way.
This is a tricky one. Let me try to summarize.
asyncs are used throughout._is_text_encoding=Falseerror.This play still works:
And then this right after fails with above error:
Both
npmandcommandfail with the same error. I first thought it was annpmmodule issue, but evidently it's not.The host executing the play runs Debian sid, and as mentioned the target host runs Debian 8 at the start of the play and then is upgraded during the play.
Unfortunately the only way I can reproduce this, is by instantiating one of those Debian 8 desktops and then executing this entire upgrade play (takes 30mins-2hrs depending on download speed and target host cpu). I haven't been able to reproduce in any other way.