Fix warning about missing pseudo file systems.

This commit is contained in:
Andreas B. Mundt 2022-03-16 15:22:17 +01:00 committed by Andreas B. Mundt
parent aa34a0a910
commit 9e2a6a70e3

View file

@ -38,13 +38,19 @@
path: /var/lib/machines/{{ contname }}00/etc/profile path: /var/lib/machines/{{ contname }}00/etc/profile
line: 'export LANG=C' line: 'export LANG=C'
## Use 'chroot' here instead of 'systemd-nspawn -D …' to make it work
## with ansible-pull in the preseed debian installer:
- name: upgrade container - name: upgrade container
command: command:
cmd: > cmd: "{{ item }}"
chroot . sh -c '/usr/bin/apt-get update &&
DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get full-upgrade --yes'
args: args:
chdir: /var/lib/machines/{{ contname }}00 chdir: /var/lib/machines/{{ contname }}00
loop:
- mount --bind /proc proc
- mount --bind /sys sys
- mount --bind /dev/pts dev/pts
- chroot . sh -c '/usr/bin/apt-get update && DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get full-upgrade --yes'
- umount proc sys dev/pts
register: cmd_result register: cmd_result
changed_when: cmd_result.stdout is not search('0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.') changed_when: cmd_result.stdout is not search('0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.')