Fix warning about missing pseudo file systems.
This commit is contained in:
parent
aa34a0a910
commit
9e2a6a70e3
1 changed files with 9 additions and 3 deletions
|
@ -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.')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue