Problems with ansible












-1















in the work I have a task to install Zabbix Agent on a list of machines using Ansible.
My problem is that the machines have some cache problems and I tried to solve it using Ansible but with no succed, I've tried using



- command: apt-get install -f
become: true



and also



- name: Update and upgrade apt packages
become: true
apt:
upgrade: yes
update_cache: yes



But always I have an pretty big error message.




fatal: [MACHINE IP]: FAILED! => {"changed": true, "cmd": ["apt-get", "install", "-f"], "delta": "0:01:13.499864", "end": "2018-11-21 17:55:11.172264", "msg": "non-zero return code",
"rc": 100, "start": "2018-11-21 17:53:57.672400", "stderr": "No apport report written because the error message indicates its a followup error from a previous failure.nNo apport report
written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport
report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo
apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo
apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynE:
Sub-process /usr/bin/dpkg returned an error code (1)", "stderr_lines": ["No apport report written because the error message indicates its a followup error from a previous failure.",
"No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached
already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports
is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because
MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written
because MaxReports is reached already", "E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...nBuilding dependency tree...nReading state
information...nThe following packages were automatically installed and are no longer required:n libcurl3 linux-headers-4.4.0-101 linux-headers-4.4.0-101-genericn

linux-headers-4.4.0-103 linux-headers-4.4.0-103-genericn linux-headers-4.4.0-104 linux-headers-4.4.0-104-genericn linux-headers-4.4.0-109 linux-headers-4.4.0-109-genericn

linux-headers-4.4.0-112 linux-headers-4.4.0-112-genericn linux-headers-4.4.0-116 linux-headers-4.4.0-116-genericn linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic
linux-headers-4.4.0-87n linux-headers-4.4.0-87-generic linux-headers-4.4.0-96n linux-headers-4.4.0-96-generic linux-headers-4.4.0-97n linux-headers-4.4.0-97-generic
linux-headers-4.4.0-98n linux-headers-4.4.0-98-generic linux-image-4.4.0-101-genericn linux-image-4.4.0-103-generic linux-image-4.4.0-104-genericn

linux-image-4.4.0-109-generic linux-image-4.4.0-112-genericn linux-image-4.4.0-116-generic linux-image-4.4.0-31-genericn linux-image-4.4.0-87-generic
linux-image-4.4.0-96-genericn linux-image-4.4.0-97-generic linux-image-4.4.0-98-genericn linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-103-genericn

linux-image-extra-4.4.0-104-generic linux-image-extra-4.4.0-109-genericn linux-image-extra-4.4.0-112-generic linux-image-extra-4.4.0-116-genericn

linux-image-extra-4.4.0-31-generic linux-image-extra-4.4.0-87-genericn linux-image-extra-4.4.0-96-generic linux-image-extra-4.4.0-97-genericn

linux-image-extra-4.4.0-98-genericnUse 'sudo apt autoremove' to remove them.n0 upgraded, 0 newly installed, 0 to remove and 143 not upgraded.n15 not fully installed or removed.nAfter
this operation, 0 B of additional disk space will be used.nSetting up initramfs-tools (0.122ubuntu8.1) ...rnupdate-initramfs: deferring update (trigger activated)rnSetting up
linux-firmware (1.157.20) ...rnupdate-initramfs: Generating /boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on
devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rndpkg: error processing package linux-firmware
(--configure):rn subprocess installed post-installation script returned error exit status 1rnSetting up linux-image-4.4.0-139-generic (4.4.0-139.165)
...rnRunning depmod.rnupdate-initramfs: deferring update (hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-138-genericrnExamining
/etc/kernel/postinst.d.rnrun-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericrnrun-parts:
executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-139-genericrnW: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for
/boot/initrd.img-4.4.0-139-generic with 1.rnrun-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-139-generic.postinst line 1052.rndpkg: error processing package linux-image-4.4.0-139-generic (--configure):rn subprocess installed post-installation
script returned error exit status 2rndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-139-generic:rn linux-image-extra-4.4.0-139-generic
depends on linux-image-4.4.0-139-generic; however:rn Package linux-image-4.4.0-139-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-139-generic
(--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of linux-image-generic:rn linux-image-generic
depends on linux-image-4.4.0-139-generic; however:rn Package linux-image-4.4.0-139-generic is not configured yet.rn linux-image-generic depends on linux-image-extra-4.4.0-139-generic;
however:rn Package linux-image-extra-4.4.0-139-generic is not configured yet.rn linux-image-generic depends on linux-firmware; however:rn Package linux-firmware is not
configured yet.rnrndpkg: error processing package linux-image-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of
linux-generic:rn linux-generic depends on linux-image-generic (= 4.4.0.139.145); however:rn Package linux-image-generic is not configured yet.rnrndpkg: error processing package
linux-generic (--configure):rn dependency problems - leaving unconfiguredrnSetting up linux-image-4.4.0-109-generic (4.4.0-109.132) ...rnInternal Error: Could not find image
(/boot/vmlinuz-4.4.0-109-generic)rndpkg: error processing package linux-image-4.4.0-109-generic (--configure):rn subprocess installed post-installation script returned error exit
status 2rnSetting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...rnInternal Error: Could not find image (/boot/vmlinuz-4.4.0-112-generic)rndpkg: error processing package
linux-image-4.4.0-112-generic (--configure):rn subprocess installed post-installation script returned error exit status 2rnSetting up linux-image-4.4.0-116-generic (4.4.0-116.140)
...rnRunning depmod.rnupdate-initramfs: deferring update (hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-139-genericrnExamining
/etc/kernel/postinst.d.rnrun-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-genericrnrun-parts: executing
/etc/kernel/postinst.d/initramfs-tools 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-116-genericrnW: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for
/boot/initrd.img-4.4.0-116-generic with 1.rnrun-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-116-generic.postinst line 1052.rndpkg: error processing package linux-image-4.4.0-116-generic (--configure):rn subprocess installed
post-installation script returned error exit status 2rnSetting up linux-image-4.4.0-138-generic (4.4.0-138.164) ...rnRunning depmod.rnupdate-initramfs: deferring update
(hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-116-genericrnExamining /etc/kernel/postinst.d.rnrun-parts:
executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-138-generic /boot/vmlinuz-4.4.0-138-genericrnrun-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-138-generic
/boot/vmlinuz-4.4.0-138-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-138-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout:
No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-138-generic with 1.rnrun-parts:
/etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-138-generic.postinst line
1052.rndpkg: error processing package linux-image-4.4.0-138-generic (--configure):rn subprocess installed post-installation script returned error exit status 2rnSetting up
linux-image-extra-4.4.0-108-generic (4.4.0-108.131) ...rndepmod: FATAL: could not load /boot/System.map-4.4.0-108-generic: No such file or directoryrnrun-parts: executing
/etc/kernel/postinst.d/apt-auto-removal 4.4.0-108-generic /boot/vmlinuz-4.4.0-108-genericrnrun-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-108-generic
/boot/vmlinuz-4.4.0-108-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip:
stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rnrun-parts:
/etc/kernel/postinst.d/initramfs-tools exited with return code 1rndpkg: error processing package linux-image-extra-4.4.0-108-generic (--configure):rn subprocess
installed post-installation script returned error exit status 1rndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-109-generic:rn
linux-image-extra-4.4.0-109-generic depends on linux-image-4.4.0-109-generic; however:rn Package linux-image-4.4.0-109-generic is not configured yet.rnrndpkg:
error processing package linux-image-extra-4.4.0-109-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of
linux-image-extra-4.4.0-112-generic:rn linux-image-extra-4.4.0-112-generic depends on linux-image-4.4.0-112-generic; however:rn Package linux-image-4.4.0-112-generic is
not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency
problems prevent configuration of linux-image-extra-4.4.0-116-generic:rn linux-image-extra-4.4.0-116-generic depends on linux-image-4.4.0-116-generic; however:rn

Package linux-image-4.4.0-116-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-116-generic (--configure):rn dependency problems -
leaving unconfiguredrndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-138-generic:rn linux-image-extra-4.4.0-138-generic depends on
linux-image-4.4.0-138-generic; however:rn Package linux-image-4.4.0-138-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-138-generic
(--configure):rn dependency problems - leaving unconfiguredrnProcessing triggers for initramfs-tools (0.122ubuntu8.1) ...rnupdate-initramfs: Generating
/boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip
1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rndpkg: error processing package initramfs-tools (--configure):rn subprocess installed post-installation
script returned error exit status 1rnErrors were encountered while processing:rn linux-firmwarern linux-image-4.4.0-139-genericrn linux-image-extra-4.4.0-139-genericrn
linux-image-genericrn linux-genericrn linux-image-4.4.0-109-genericrn linux-image-4.4.0-112-genericrn linux-image-4.4.0-116-genericrn linux-image-4.4.0-138-genericrn
linux-image-extra-4.4.0-108-genericrn linux-image-extra-4.4.0-109-genericrn linux-image-extra-4.4.0-112-genericrn linux-image-extra-4.4.0-116-genericrn
linux-image-extra-4.4.0-138-genericrn initramfs-tools", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...",
"The following packages were automatically installed and are no longer required:", " libcurl3 linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic", " linux-headers-4.4.0-103
linux-headers-4.4.0-103-generic", " linux-headers-4.4.0-104 linux-headers-4.4.0-104-generic", " linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic", "

linux-headers-4.4.0-112 linux-headers-4.4.0-112-generic", " linux-headers-4.4.0-116 linux-headers-4.4.0-116-generic", " linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic
linux-headers-4.4.0-87", " linux-headers-4.4.0-87-generic linux-headers-4.4.0-96", " linux-headers-4.4.0-96-generic linux-headers-4.4.0-97", " linux-headers-4.4.0-97-generic
linux-headers-4.4.0-98", " linux-headers-4.4.0-98-generic linux-image-4.4.0-101-generic", " linux-image-4.4.0-103-generic linux-image-4.4.0-104-generic", "

linux-image-4.4.0-109-generic linux-image-4.4.0-112-generic", " linux-image-4.4.0-116-generic linux-image-4.4.0-31-generic", " linux-image-4.4.0-87-generic linux-image-4.4.0-96-generic", "

linux-image-4.4.0-97-generic linux-image-4.4.0-98-generic", " linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-103-generic", " linux-image-extra-4.4.0-104-generic
linux-image-extra-4.4.0-109-generic", " linux-image-extra-4.4.0-112-generic linux-image-extra-4.4.0-116-generic", " linux-image-extra-4.4.0-31-generic linux-image-extra-4.4.0-87-generic", "

linux-image-extra-4.4.0-96-generic linux-image-extra-4.4.0-97-generic", " linux-image-extra-4.4.0-98-generic", "Use 'sudo apt autoremove' to remove them.", "0 upgraded, 0 newly
installed, 0 to remove and 143 not upgraded.", "15 not fully installed or removed.", "After this operation, 0 B of additional disk space will be used.", "Setting up initramfs-tools
(0.122ubuntu8.1) ...", "update-initramfs: deferring update (trigger activated)", "Setting up linux-firmware (1.157.20) ...", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic",
"W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for
/boot/initrd.img-4.4.0-108-generic with 1.", "dpkg: error processing package linux-firmware (--configure):", " subprocess installed post-installation script returned error exit status 1",
"Setting up linux-image-4.4.0-139-generic (4.4.0-139.165) ...", "Running depmod.", "update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is a dangling linkto
/boot/initrd.img-4.4.0-138-generic", "Examining /etc/kernel/postinst.d.", "run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic",
"run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-139-generic", "W: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for
/boot/initrd.img-4.4.0-139-generic with 1.", "run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-139-generic.postinst line 1052.", "dpkg: error processing package linux-image-4.4.0-139-generic (--configure):", "
subprocess installed post-installation script returned error exit status 2", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-139-generic:",
" linux-image-extra-4.4.0-139-generic depends on linux-image-4.4.0-139-generic; however:", " Package linux-image-4.4.0-139-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-139-generic (--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems prevent configuration of
linux-image-generic:", " linux-image-generic depends on linux-image-4.4.0-139-generic; however:", " Package linux-image-4.4.0-139-generic is not configured yet.", " linux-image-generic
depends on linux-image-extra-4.4.0-139-generic; however:", " Package linux-image-extra-4.4.0-139-generic is not configured yet.", " linux-image-generic depends on linux-firmware;
however:", " Package linux-firmware is not configured yet.", "", "dpkg: error processing package linux-image-generic (--configure):", " dependency problems - leaving unconfigured",
"dpkg: dependency problems prevent configuration of linux-generic:", " linux-generic depends on linux-image-generic (= 4.4.0.139.145); however:", " Package linux-image-generic is not
configured yet.", "", "dpkg: error processing package linux-generic (--configure):", " dependency problems - leaving unconfigured", "Setting up linux-image-4.4.0-109-generic
(4.4.0-109.132) ...", "Internal Error: Could not find image (/boot/vmlinuz-4.4.0-109-generic)", "dpkg: error processing package linux-image-4.4.0-109-generic (--configure):", "
subprocess installed post-installation script returned error exit status 2", "Setting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...", "Internal Error: Could not find image
(/boot/vmlinuz-4.4.0-112-generic)", "dpkg: error processing package linux-image-4.4.0-112-generic (--configure):", " subprocess installed post-installation script returned error exit
status 2", "Setting up linux-image-4.4.0-116-generic (4.4.0-116.140) ...", "Running depmod.", "update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is
a dangling linkto /boot/initrd.img-4.4.0-139-generic", "Examining /etc/kernel/postinst.d.", "run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-116-generic
/boot/vmlinuz-4.4.0-116-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic", "update-initramfs: Generating
/boot/initrd.img-4.4.0-116-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1",
"update-initramfs: failed for /boot/initrd.img-4.4.0-116-generic with 1.", "run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process
/etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-116-generic.postinst line 1052.", "dpkg: error processing package linux-image-4.4.0-116-generic (--configure):",
" subprocess installed post-installation script returned error exit status 2", "Setting up linux-image-4.4.0-138-generic (4.4.0-138.164) ...", "Running depmod.",
"update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-116-generic", "Examining /etc/kernel/postinst.d.",
"run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-138-generic /boot/vmlinuz-4.4.0-138-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools
4.4.0-138-generic /boot/vmlinuz-4.4.0-138-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-138-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "",
"gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-138-generic with 1.",
"run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-138-generic.postinst line
1052.", "dpkg: error processing package linux-image-4.4.0-138-generic (--configure):", " subprocess installed post-installation script returned error exit status 2",
"Setting up linux-image-extra-4.4.0-108-generic (4.4.0-108.131) ...", "depmod: FATAL: could not load /boot/System.map-4.4.0-108-generic: No such file or directory",
"run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-108-generic /boot/vmlinuz-4.4.0-108-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools
4.4.0-108-generic /boot/vmlinuz-4.4.0-108-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "",
"gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.",
"run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "dpkg: error processing package linux-image-extra-4.4.0-108-generic (--configure):",
" subprocess installed post-installation script returned error exit status 1", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-109-generic:",
" linux-image-extra-4.4.0-109-generic depends on linux-image-4.4.0-109-generic; however:", " Package linux-image-4.4.0-109-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-109-generic (--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems
prevent configuration of linux-image-extra-4.4.0-112-generic:", " linux-image-extra-4.4.0-112-generic depends on linux-image-4.4.0-112-generic; however:", " Package
linux-image-4.4.0-112-generic is not configured yet.", "", "dpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):", " dependency problems
- leaving unconfigured", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-116-generic:", " linux-image-extra-4.4.0-116-generic depends on
linux-image-4.4.0-116-generic; however:", " Package linux-image-4.4.0-116-generic is not configured yet.", "", "dpkg: error processing package linux-image-extra-4.4.0-116-generic
(--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-138-generic:", "
linux-image-extra-4.4.0-138-generic depends on linux-image-4.4.0-138-generic; however:", " Package linux-image-4.4.0-138-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-138-generic (--configure):", " dependency problems - leaving unconfigured", "Processing triggers for initramfs-tools
(0.122ubuntu8.1) ...", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device",
"E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.", "dpkg: error processing package initramfs-tools (--configure):",
" subprocess installed post-installation script returned error exit status 1", "Errors were encountered while processing:", " linux-firmware", " linux-image-4.4.0-139-generic",
" linux-image-extra-4.4.0-139-generic", " linux-image-generic", " linux-generic", " linux-image-4.4.0-109-generic", " linux-image-4.4.0-112-generic", " linux-image-4.4.0-116-generic",
" linux-image-4.4.0-138-generic", " linux-image-extra-4.4.0-108-generic", " linux-image-extra-4.4.0-109-generic", " linux-image-extra-4.4.0-112-generic",
" linux-image-extra-4.4.0-116-generic", " linux-image-extra-4.4.0-138-generic", " initramfs-tools"]}




When I try to install it without Ansible everything works fine until I tried to start the service




-- Unit zabbix-agent.service has begun starting up.
Nov 22 16:03:00 FRPARUDASTOH02 zabbix_agentd[2748]: zabbix_agentd [2748]: /etc/zabbix/zabbix_agentd.conf.d: [2] No such file or directory
Nov 22 16:03:00 FRPARUDASTOH02 systemd[1]: zabbix-agent.service: Control process exited, code=exited status=1
Nov 22 16:03:00 FRPARUDASTOH02 systemd[1]: Failed to start Zabbix Agent.
-- Subject: Unit zabbix-agent.service has failed
-- Defined-By: systemd




The Linux that I'm sing are Ubuntu 16










share|improve this question




















  • 2





    What specific errors did you encounter when trying to install it without Ansible? What specific errors did you encounter when trying to install it with Ansible? Your question needs more details on the errors. Please check out the FAQ on how to ask good questions.

    – Michael Gardner
    Nov 21 '18 at 14:49






  • 1





    some cache problems what cache problems? pretty big error message. what error message?

    – Kamil Cuk
    Nov 21 '18 at 14:55








  • 1





    Hi welcome to stack overflow. Here is some info on asking a good question How to Ask. Also as indentation is important in yaml and Ansible formatting your code correctly would be useful in addition to adding the error you received.

    – Peter Halligan
    Nov 21 '18 at 21:51











  • Read the error message and act occordingly. zabbix packages are sometimes unmaintained cause they change sometimes often, create the /etc/zabbix/zabbix_agentd.conf.d directory or remove the include statemtnt from /etc/zabbix/zabbix_agent(d?).conf configuration file. Do you run your ansible with root permissions on the other machine? If not, you might get No space left on device errors, maybe. And you better cleanup those unnedded kernel packages - they just use up space.

    – Kamil Cuk
    Nov 22 '18 at 21:11


















-1















in the work I have a task to install Zabbix Agent on a list of machines using Ansible.
My problem is that the machines have some cache problems and I tried to solve it using Ansible but with no succed, I've tried using



- command: apt-get install -f
become: true



and also



- name: Update and upgrade apt packages
become: true
apt:
upgrade: yes
update_cache: yes



But always I have an pretty big error message.




fatal: [MACHINE IP]: FAILED! => {"changed": true, "cmd": ["apt-get", "install", "-f"], "delta": "0:01:13.499864", "end": "2018-11-21 17:55:11.172264", "msg": "non-zero return code",
"rc": 100, "start": "2018-11-21 17:53:57.672400", "stderr": "No apport report written because the error message indicates its a followup error from a previous failure.nNo apport report
written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport
report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo
apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo
apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynE:
Sub-process /usr/bin/dpkg returned an error code (1)", "stderr_lines": ["No apport report written because the error message indicates its a followup error from a previous failure.",
"No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached
already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports
is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because
MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written
because MaxReports is reached already", "E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...nBuilding dependency tree...nReading state
information...nThe following packages were automatically installed and are no longer required:n libcurl3 linux-headers-4.4.0-101 linux-headers-4.4.0-101-genericn

linux-headers-4.4.0-103 linux-headers-4.4.0-103-genericn linux-headers-4.4.0-104 linux-headers-4.4.0-104-genericn linux-headers-4.4.0-109 linux-headers-4.4.0-109-genericn

linux-headers-4.4.0-112 linux-headers-4.4.0-112-genericn linux-headers-4.4.0-116 linux-headers-4.4.0-116-genericn linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic
linux-headers-4.4.0-87n linux-headers-4.4.0-87-generic linux-headers-4.4.0-96n linux-headers-4.4.0-96-generic linux-headers-4.4.0-97n linux-headers-4.4.0-97-generic
linux-headers-4.4.0-98n linux-headers-4.4.0-98-generic linux-image-4.4.0-101-genericn linux-image-4.4.0-103-generic linux-image-4.4.0-104-genericn

linux-image-4.4.0-109-generic linux-image-4.4.0-112-genericn linux-image-4.4.0-116-generic linux-image-4.4.0-31-genericn linux-image-4.4.0-87-generic
linux-image-4.4.0-96-genericn linux-image-4.4.0-97-generic linux-image-4.4.0-98-genericn linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-103-genericn

linux-image-extra-4.4.0-104-generic linux-image-extra-4.4.0-109-genericn linux-image-extra-4.4.0-112-generic linux-image-extra-4.4.0-116-genericn

linux-image-extra-4.4.0-31-generic linux-image-extra-4.4.0-87-genericn linux-image-extra-4.4.0-96-generic linux-image-extra-4.4.0-97-genericn

linux-image-extra-4.4.0-98-genericnUse 'sudo apt autoremove' to remove them.n0 upgraded, 0 newly installed, 0 to remove and 143 not upgraded.n15 not fully installed or removed.nAfter
this operation, 0 B of additional disk space will be used.nSetting up initramfs-tools (0.122ubuntu8.1) ...rnupdate-initramfs: deferring update (trigger activated)rnSetting up
linux-firmware (1.157.20) ...rnupdate-initramfs: Generating /boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on
devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rndpkg: error processing package linux-firmware
(--configure):rn subprocess installed post-installation script returned error exit status 1rnSetting up linux-image-4.4.0-139-generic (4.4.0-139.165)
...rnRunning depmod.rnupdate-initramfs: deferring update (hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-138-genericrnExamining
/etc/kernel/postinst.d.rnrun-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericrnrun-parts:
executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-139-genericrnW: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for
/boot/initrd.img-4.4.0-139-generic with 1.rnrun-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-139-generic.postinst line 1052.rndpkg: error processing package linux-image-4.4.0-139-generic (--configure):rn subprocess installed post-installation
script returned error exit status 2rndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-139-generic:rn linux-image-extra-4.4.0-139-generic
depends on linux-image-4.4.0-139-generic; however:rn Package linux-image-4.4.0-139-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-139-generic
(--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of linux-image-generic:rn linux-image-generic
depends on linux-image-4.4.0-139-generic; however:rn Package linux-image-4.4.0-139-generic is not configured yet.rn linux-image-generic depends on linux-image-extra-4.4.0-139-generic;
however:rn Package linux-image-extra-4.4.0-139-generic is not configured yet.rn linux-image-generic depends on linux-firmware; however:rn Package linux-firmware is not
configured yet.rnrndpkg: error processing package linux-image-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of
linux-generic:rn linux-generic depends on linux-image-generic (= 4.4.0.139.145); however:rn Package linux-image-generic is not configured yet.rnrndpkg: error processing package
linux-generic (--configure):rn dependency problems - leaving unconfiguredrnSetting up linux-image-4.4.0-109-generic (4.4.0-109.132) ...rnInternal Error: Could not find image
(/boot/vmlinuz-4.4.0-109-generic)rndpkg: error processing package linux-image-4.4.0-109-generic (--configure):rn subprocess installed post-installation script returned error exit
status 2rnSetting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...rnInternal Error: Could not find image (/boot/vmlinuz-4.4.0-112-generic)rndpkg: error processing package
linux-image-4.4.0-112-generic (--configure):rn subprocess installed post-installation script returned error exit status 2rnSetting up linux-image-4.4.0-116-generic (4.4.0-116.140)
...rnRunning depmod.rnupdate-initramfs: deferring update (hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-139-genericrnExamining
/etc/kernel/postinst.d.rnrun-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-genericrnrun-parts: executing
/etc/kernel/postinst.d/initramfs-tools 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-116-genericrnW: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for
/boot/initrd.img-4.4.0-116-generic with 1.rnrun-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-116-generic.postinst line 1052.rndpkg: error processing package linux-image-4.4.0-116-generic (--configure):rn subprocess installed
post-installation script returned error exit status 2rnSetting up linux-image-4.4.0-138-generic (4.4.0-138.164) ...rnRunning depmod.rnupdate-initramfs: deferring update
(hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-116-genericrnExamining /etc/kernel/postinst.d.rnrun-parts:
executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-138-generic /boot/vmlinuz-4.4.0-138-genericrnrun-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-138-generic
/boot/vmlinuz-4.4.0-138-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-138-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout:
No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-138-generic with 1.rnrun-parts:
/etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-138-generic.postinst line
1052.rndpkg: error processing package linux-image-4.4.0-138-generic (--configure):rn subprocess installed post-installation script returned error exit status 2rnSetting up
linux-image-extra-4.4.0-108-generic (4.4.0-108.131) ...rndepmod: FATAL: could not load /boot/System.map-4.4.0-108-generic: No such file or directoryrnrun-parts: executing
/etc/kernel/postinst.d/apt-auto-removal 4.4.0-108-generic /boot/vmlinuz-4.4.0-108-genericrnrun-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-108-generic
/boot/vmlinuz-4.4.0-108-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip:
stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rnrun-parts:
/etc/kernel/postinst.d/initramfs-tools exited with return code 1rndpkg: error processing package linux-image-extra-4.4.0-108-generic (--configure):rn subprocess
installed post-installation script returned error exit status 1rndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-109-generic:rn
linux-image-extra-4.4.0-109-generic depends on linux-image-4.4.0-109-generic; however:rn Package linux-image-4.4.0-109-generic is not configured yet.rnrndpkg:
error processing package linux-image-extra-4.4.0-109-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of
linux-image-extra-4.4.0-112-generic:rn linux-image-extra-4.4.0-112-generic depends on linux-image-4.4.0-112-generic; however:rn Package linux-image-4.4.0-112-generic is
not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency
problems prevent configuration of linux-image-extra-4.4.0-116-generic:rn linux-image-extra-4.4.0-116-generic depends on linux-image-4.4.0-116-generic; however:rn

Package linux-image-4.4.0-116-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-116-generic (--configure):rn dependency problems -
leaving unconfiguredrndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-138-generic:rn linux-image-extra-4.4.0-138-generic depends on
linux-image-4.4.0-138-generic; however:rn Package linux-image-4.4.0-138-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-138-generic
(--configure):rn dependency problems - leaving unconfiguredrnProcessing triggers for initramfs-tools (0.122ubuntu8.1) ...rnupdate-initramfs: Generating
/boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip
1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rndpkg: error processing package initramfs-tools (--configure):rn subprocess installed post-installation
script returned error exit status 1rnErrors were encountered while processing:rn linux-firmwarern linux-image-4.4.0-139-genericrn linux-image-extra-4.4.0-139-genericrn
linux-image-genericrn linux-genericrn linux-image-4.4.0-109-genericrn linux-image-4.4.0-112-genericrn linux-image-4.4.0-116-genericrn linux-image-4.4.0-138-genericrn
linux-image-extra-4.4.0-108-genericrn linux-image-extra-4.4.0-109-genericrn linux-image-extra-4.4.0-112-genericrn linux-image-extra-4.4.0-116-genericrn
linux-image-extra-4.4.0-138-genericrn initramfs-tools", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...",
"The following packages were automatically installed and are no longer required:", " libcurl3 linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic", " linux-headers-4.4.0-103
linux-headers-4.4.0-103-generic", " linux-headers-4.4.0-104 linux-headers-4.4.0-104-generic", " linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic", "

linux-headers-4.4.0-112 linux-headers-4.4.0-112-generic", " linux-headers-4.4.0-116 linux-headers-4.4.0-116-generic", " linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic
linux-headers-4.4.0-87", " linux-headers-4.4.0-87-generic linux-headers-4.4.0-96", " linux-headers-4.4.0-96-generic linux-headers-4.4.0-97", " linux-headers-4.4.0-97-generic
linux-headers-4.4.0-98", " linux-headers-4.4.0-98-generic linux-image-4.4.0-101-generic", " linux-image-4.4.0-103-generic linux-image-4.4.0-104-generic", "

linux-image-4.4.0-109-generic linux-image-4.4.0-112-generic", " linux-image-4.4.0-116-generic linux-image-4.4.0-31-generic", " linux-image-4.4.0-87-generic linux-image-4.4.0-96-generic", "

linux-image-4.4.0-97-generic linux-image-4.4.0-98-generic", " linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-103-generic", " linux-image-extra-4.4.0-104-generic
linux-image-extra-4.4.0-109-generic", " linux-image-extra-4.4.0-112-generic linux-image-extra-4.4.0-116-generic", " linux-image-extra-4.4.0-31-generic linux-image-extra-4.4.0-87-generic", "

linux-image-extra-4.4.0-96-generic linux-image-extra-4.4.0-97-generic", " linux-image-extra-4.4.0-98-generic", "Use 'sudo apt autoremove' to remove them.", "0 upgraded, 0 newly
installed, 0 to remove and 143 not upgraded.", "15 not fully installed or removed.", "After this operation, 0 B of additional disk space will be used.", "Setting up initramfs-tools
(0.122ubuntu8.1) ...", "update-initramfs: deferring update (trigger activated)", "Setting up linux-firmware (1.157.20) ...", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic",
"W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for
/boot/initrd.img-4.4.0-108-generic with 1.", "dpkg: error processing package linux-firmware (--configure):", " subprocess installed post-installation script returned error exit status 1",
"Setting up linux-image-4.4.0-139-generic (4.4.0-139.165) ...", "Running depmod.", "update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is a dangling linkto
/boot/initrd.img-4.4.0-138-generic", "Examining /etc/kernel/postinst.d.", "run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic",
"run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-139-generic", "W: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for
/boot/initrd.img-4.4.0-139-generic with 1.", "run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-139-generic.postinst line 1052.", "dpkg: error processing package linux-image-4.4.0-139-generic (--configure):", "
subprocess installed post-installation script returned error exit status 2", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-139-generic:",
" linux-image-extra-4.4.0-139-generic depends on linux-image-4.4.0-139-generic; however:", " Package linux-image-4.4.0-139-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-139-generic (--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems prevent configuration of
linux-image-generic:", " linux-image-generic depends on linux-image-4.4.0-139-generic; however:", " Package linux-image-4.4.0-139-generic is not configured yet.", " linux-image-generic
depends on linux-image-extra-4.4.0-139-generic; however:", " Package linux-image-extra-4.4.0-139-generic is not configured yet.", " linux-image-generic depends on linux-firmware;
however:", " Package linux-firmware is not configured yet.", "", "dpkg: error processing package linux-image-generic (--configure):", " dependency problems - leaving unconfigured",
"dpkg: dependency problems prevent configuration of linux-generic:", " linux-generic depends on linux-image-generic (= 4.4.0.139.145); however:", " Package linux-image-generic is not
configured yet.", "", "dpkg: error processing package linux-generic (--configure):", " dependency problems - leaving unconfigured", "Setting up linux-image-4.4.0-109-generic
(4.4.0-109.132) ...", "Internal Error: Could not find image (/boot/vmlinuz-4.4.0-109-generic)", "dpkg: error processing package linux-image-4.4.0-109-generic (--configure):", "
subprocess installed post-installation script returned error exit status 2", "Setting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...", "Internal Error: Could not find image
(/boot/vmlinuz-4.4.0-112-generic)", "dpkg: error processing package linux-image-4.4.0-112-generic (--configure):", " subprocess installed post-installation script returned error exit
status 2", "Setting up linux-image-4.4.0-116-generic (4.4.0-116.140) ...", "Running depmod.", "update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is
a dangling linkto /boot/initrd.img-4.4.0-139-generic", "Examining /etc/kernel/postinst.d.", "run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-116-generic
/boot/vmlinuz-4.4.0-116-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic", "update-initramfs: Generating
/boot/initrd.img-4.4.0-116-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1",
"update-initramfs: failed for /boot/initrd.img-4.4.0-116-generic with 1.", "run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process
/etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-116-generic.postinst line 1052.", "dpkg: error processing package linux-image-4.4.0-116-generic (--configure):",
" subprocess installed post-installation script returned error exit status 2", "Setting up linux-image-4.4.0-138-generic (4.4.0-138.164) ...", "Running depmod.",
"update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-116-generic", "Examining /etc/kernel/postinst.d.",
"run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-138-generic /boot/vmlinuz-4.4.0-138-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools
4.4.0-138-generic /boot/vmlinuz-4.4.0-138-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-138-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "",
"gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-138-generic with 1.",
"run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-138-generic.postinst line
1052.", "dpkg: error processing package linux-image-4.4.0-138-generic (--configure):", " subprocess installed post-installation script returned error exit status 2",
"Setting up linux-image-extra-4.4.0-108-generic (4.4.0-108.131) ...", "depmod: FATAL: could not load /boot/System.map-4.4.0-108-generic: No such file or directory",
"run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-108-generic /boot/vmlinuz-4.4.0-108-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools
4.4.0-108-generic /boot/vmlinuz-4.4.0-108-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "",
"gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.",
"run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "dpkg: error processing package linux-image-extra-4.4.0-108-generic (--configure):",
" subprocess installed post-installation script returned error exit status 1", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-109-generic:",
" linux-image-extra-4.4.0-109-generic depends on linux-image-4.4.0-109-generic; however:", " Package linux-image-4.4.0-109-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-109-generic (--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems
prevent configuration of linux-image-extra-4.4.0-112-generic:", " linux-image-extra-4.4.0-112-generic depends on linux-image-4.4.0-112-generic; however:", " Package
linux-image-4.4.0-112-generic is not configured yet.", "", "dpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):", " dependency problems
- leaving unconfigured", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-116-generic:", " linux-image-extra-4.4.0-116-generic depends on
linux-image-4.4.0-116-generic; however:", " Package linux-image-4.4.0-116-generic is not configured yet.", "", "dpkg: error processing package linux-image-extra-4.4.0-116-generic
(--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-138-generic:", "
linux-image-extra-4.4.0-138-generic depends on linux-image-4.4.0-138-generic; however:", " Package linux-image-4.4.0-138-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-138-generic (--configure):", " dependency problems - leaving unconfigured", "Processing triggers for initramfs-tools
(0.122ubuntu8.1) ...", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device",
"E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.", "dpkg: error processing package initramfs-tools (--configure):",
" subprocess installed post-installation script returned error exit status 1", "Errors were encountered while processing:", " linux-firmware", " linux-image-4.4.0-139-generic",
" linux-image-extra-4.4.0-139-generic", " linux-image-generic", " linux-generic", " linux-image-4.4.0-109-generic", " linux-image-4.4.0-112-generic", " linux-image-4.4.0-116-generic",
" linux-image-4.4.0-138-generic", " linux-image-extra-4.4.0-108-generic", " linux-image-extra-4.4.0-109-generic", " linux-image-extra-4.4.0-112-generic",
" linux-image-extra-4.4.0-116-generic", " linux-image-extra-4.4.0-138-generic", " initramfs-tools"]}




When I try to install it without Ansible everything works fine until I tried to start the service




-- Unit zabbix-agent.service has begun starting up.
Nov 22 16:03:00 FRPARUDASTOH02 zabbix_agentd[2748]: zabbix_agentd [2748]: /etc/zabbix/zabbix_agentd.conf.d: [2] No such file or directory
Nov 22 16:03:00 FRPARUDASTOH02 systemd[1]: zabbix-agent.service: Control process exited, code=exited status=1
Nov 22 16:03:00 FRPARUDASTOH02 systemd[1]: Failed to start Zabbix Agent.
-- Subject: Unit zabbix-agent.service has failed
-- Defined-By: systemd




The Linux that I'm sing are Ubuntu 16










share|improve this question




















  • 2





    What specific errors did you encounter when trying to install it without Ansible? What specific errors did you encounter when trying to install it with Ansible? Your question needs more details on the errors. Please check out the FAQ on how to ask good questions.

    – Michael Gardner
    Nov 21 '18 at 14:49






  • 1





    some cache problems what cache problems? pretty big error message. what error message?

    – Kamil Cuk
    Nov 21 '18 at 14:55








  • 1





    Hi welcome to stack overflow. Here is some info on asking a good question How to Ask. Also as indentation is important in yaml and Ansible formatting your code correctly would be useful in addition to adding the error you received.

    – Peter Halligan
    Nov 21 '18 at 21:51











  • Read the error message and act occordingly. zabbix packages are sometimes unmaintained cause they change sometimes often, create the /etc/zabbix/zabbix_agentd.conf.d directory or remove the include statemtnt from /etc/zabbix/zabbix_agent(d?).conf configuration file. Do you run your ansible with root permissions on the other machine? If not, you might get No space left on device errors, maybe. And you better cleanup those unnedded kernel packages - they just use up space.

    – Kamil Cuk
    Nov 22 '18 at 21:11
















-1












-1








-1








in the work I have a task to install Zabbix Agent on a list of machines using Ansible.
My problem is that the machines have some cache problems and I tried to solve it using Ansible but with no succed, I've tried using



- command: apt-get install -f
become: true



and also



- name: Update and upgrade apt packages
become: true
apt:
upgrade: yes
update_cache: yes



But always I have an pretty big error message.




fatal: [MACHINE IP]: FAILED! => {"changed": true, "cmd": ["apt-get", "install", "-f"], "delta": "0:01:13.499864", "end": "2018-11-21 17:55:11.172264", "msg": "non-zero return code",
"rc": 100, "start": "2018-11-21 17:53:57.672400", "stderr": "No apport report written because the error message indicates its a followup error from a previous failure.nNo apport report
written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport
report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo
apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo
apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynE:
Sub-process /usr/bin/dpkg returned an error code (1)", "stderr_lines": ["No apport report written because the error message indicates its a followup error from a previous failure.",
"No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached
already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports
is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because
MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written
because MaxReports is reached already", "E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...nBuilding dependency tree...nReading state
information...nThe following packages were automatically installed and are no longer required:n libcurl3 linux-headers-4.4.0-101 linux-headers-4.4.0-101-genericn

linux-headers-4.4.0-103 linux-headers-4.4.0-103-genericn linux-headers-4.4.0-104 linux-headers-4.4.0-104-genericn linux-headers-4.4.0-109 linux-headers-4.4.0-109-genericn

linux-headers-4.4.0-112 linux-headers-4.4.0-112-genericn linux-headers-4.4.0-116 linux-headers-4.4.0-116-genericn linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic
linux-headers-4.4.0-87n linux-headers-4.4.0-87-generic linux-headers-4.4.0-96n linux-headers-4.4.0-96-generic linux-headers-4.4.0-97n linux-headers-4.4.0-97-generic
linux-headers-4.4.0-98n linux-headers-4.4.0-98-generic linux-image-4.4.0-101-genericn linux-image-4.4.0-103-generic linux-image-4.4.0-104-genericn

linux-image-4.4.0-109-generic linux-image-4.4.0-112-genericn linux-image-4.4.0-116-generic linux-image-4.4.0-31-genericn linux-image-4.4.0-87-generic
linux-image-4.4.0-96-genericn linux-image-4.4.0-97-generic linux-image-4.4.0-98-genericn linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-103-genericn

linux-image-extra-4.4.0-104-generic linux-image-extra-4.4.0-109-genericn linux-image-extra-4.4.0-112-generic linux-image-extra-4.4.0-116-genericn

linux-image-extra-4.4.0-31-generic linux-image-extra-4.4.0-87-genericn linux-image-extra-4.4.0-96-generic linux-image-extra-4.4.0-97-genericn

linux-image-extra-4.4.0-98-genericnUse 'sudo apt autoremove' to remove them.n0 upgraded, 0 newly installed, 0 to remove and 143 not upgraded.n15 not fully installed or removed.nAfter
this operation, 0 B of additional disk space will be used.nSetting up initramfs-tools (0.122ubuntu8.1) ...rnupdate-initramfs: deferring update (trigger activated)rnSetting up
linux-firmware (1.157.20) ...rnupdate-initramfs: Generating /boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on
devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rndpkg: error processing package linux-firmware
(--configure):rn subprocess installed post-installation script returned error exit status 1rnSetting up linux-image-4.4.0-139-generic (4.4.0-139.165)
...rnRunning depmod.rnupdate-initramfs: deferring update (hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-138-genericrnExamining
/etc/kernel/postinst.d.rnrun-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericrnrun-parts:
executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-139-genericrnW: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for
/boot/initrd.img-4.4.0-139-generic with 1.rnrun-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-139-generic.postinst line 1052.rndpkg: error processing package linux-image-4.4.0-139-generic (--configure):rn subprocess installed post-installation
script returned error exit status 2rndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-139-generic:rn linux-image-extra-4.4.0-139-generic
depends on linux-image-4.4.0-139-generic; however:rn Package linux-image-4.4.0-139-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-139-generic
(--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of linux-image-generic:rn linux-image-generic
depends on linux-image-4.4.0-139-generic; however:rn Package linux-image-4.4.0-139-generic is not configured yet.rn linux-image-generic depends on linux-image-extra-4.4.0-139-generic;
however:rn Package linux-image-extra-4.4.0-139-generic is not configured yet.rn linux-image-generic depends on linux-firmware; however:rn Package linux-firmware is not
configured yet.rnrndpkg: error processing package linux-image-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of
linux-generic:rn linux-generic depends on linux-image-generic (= 4.4.0.139.145); however:rn Package linux-image-generic is not configured yet.rnrndpkg: error processing package
linux-generic (--configure):rn dependency problems - leaving unconfiguredrnSetting up linux-image-4.4.0-109-generic (4.4.0-109.132) ...rnInternal Error: Could not find image
(/boot/vmlinuz-4.4.0-109-generic)rndpkg: error processing package linux-image-4.4.0-109-generic (--configure):rn subprocess installed post-installation script returned error exit
status 2rnSetting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...rnInternal Error: Could not find image (/boot/vmlinuz-4.4.0-112-generic)rndpkg: error processing package
linux-image-4.4.0-112-generic (--configure):rn subprocess installed post-installation script returned error exit status 2rnSetting up linux-image-4.4.0-116-generic (4.4.0-116.140)
...rnRunning depmod.rnupdate-initramfs: deferring update (hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-139-genericrnExamining
/etc/kernel/postinst.d.rnrun-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-genericrnrun-parts: executing
/etc/kernel/postinst.d/initramfs-tools 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-116-genericrnW: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for
/boot/initrd.img-4.4.0-116-generic with 1.rnrun-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-116-generic.postinst line 1052.rndpkg: error processing package linux-image-4.4.0-116-generic (--configure):rn subprocess installed
post-installation script returned error exit status 2rnSetting up linux-image-4.4.0-138-generic (4.4.0-138.164) ...rnRunning depmod.rnupdate-initramfs: deferring update
(hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-116-genericrnExamining /etc/kernel/postinst.d.rnrun-parts:
executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-138-generic /boot/vmlinuz-4.4.0-138-genericrnrun-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-138-generic
/boot/vmlinuz-4.4.0-138-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-138-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout:
No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-138-generic with 1.rnrun-parts:
/etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-138-generic.postinst line
1052.rndpkg: error processing package linux-image-4.4.0-138-generic (--configure):rn subprocess installed post-installation script returned error exit status 2rnSetting up
linux-image-extra-4.4.0-108-generic (4.4.0-108.131) ...rndepmod: FATAL: could not load /boot/System.map-4.4.0-108-generic: No such file or directoryrnrun-parts: executing
/etc/kernel/postinst.d/apt-auto-removal 4.4.0-108-generic /boot/vmlinuz-4.4.0-108-genericrnrun-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-108-generic
/boot/vmlinuz-4.4.0-108-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip:
stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rnrun-parts:
/etc/kernel/postinst.d/initramfs-tools exited with return code 1rndpkg: error processing package linux-image-extra-4.4.0-108-generic (--configure):rn subprocess
installed post-installation script returned error exit status 1rndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-109-generic:rn
linux-image-extra-4.4.0-109-generic depends on linux-image-4.4.0-109-generic; however:rn Package linux-image-4.4.0-109-generic is not configured yet.rnrndpkg:
error processing package linux-image-extra-4.4.0-109-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of
linux-image-extra-4.4.0-112-generic:rn linux-image-extra-4.4.0-112-generic depends on linux-image-4.4.0-112-generic; however:rn Package linux-image-4.4.0-112-generic is
not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency
problems prevent configuration of linux-image-extra-4.4.0-116-generic:rn linux-image-extra-4.4.0-116-generic depends on linux-image-4.4.0-116-generic; however:rn

Package linux-image-4.4.0-116-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-116-generic (--configure):rn dependency problems -
leaving unconfiguredrndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-138-generic:rn linux-image-extra-4.4.0-138-generic depends on
linux-image-4.4.0-138-generic; however:rn Package linux-image-4.4.0-138-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-138-generic
(--configure):rn dependency problems - leaving unconfiguredrnProcessing triggers for initramfs-tools (0.122ubuntu8.1) ...rnupdate-initramfs: Generating
/boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip
1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rndpkg: error processing package initramfs-tools (--configure):rn subprocess installed post-installation
script returned error exit status 1rnErrors were encountered while processing:rn linux-firmwarern linux-image-4.4.0-139-genericrn linux-image-extra-4.4.0-139-genericrn
linux-image-genericrn linux-genericrn linux-image-4.4.0-109-genericrn linux-image-4.4.0-112-genericrn linux-image-4.4.0-116-genericrn linux-image-4.4.0-138-genericrn
linux-image-extra-4.4.0-108-genericrn linux-image-extra-4.4.0-109-genericrn linux-image-extra-4.4.0-112-genericrn linux-image-extra-4.4.0-116-genericrn
linux-image-extra-4.4.0-138-genericrn initramfs-tools", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...",
"The following packages were automatically installed and are no longer required:", " libcurl3 linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic", " linux-headers-4.4.0-103
linux-headers-4.4.0-103-generic", " linux-headers-4.4.0-104 linux-headers-4.4.0-104-generic", " linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic", "

linux-headers-4.4.0-112 linux-headers-4.4.0-112-generic", " linux-headers-4.4.0-116 linux-headers-4.4.0-116-generic", " linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic
linux-headers-4.4.0-87", " linux-headers-4.4.0-87-generic linux-headers-4.4.0-96", " linux-headers-4.4.0-96-generic linux-headers-4.4.0-97", " linux-headers-4.4.0-97-generic
linux-headers-4.4.0-98", " linux-headers-4.4.0-98-generic linux-image-4.4.0-101-generic", " linux-image-4.4.0-103-generic linux-image-4.4.0-104-generic", "

linux-image-4.4.0-109-generic linux-image-4.4.0-112-generic", " linux-image-4.4.0-116-generic linux-image-4.4.0-31-generic", " linux-image-4.4.0-87-generic linux-image-4.4.0-96-generic", "

linux-image-4.4.0-97-generic linux-image-4.4.0-98-generic", " linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-103-generic", " linux-image-extra-4.4.0-104-generic
linux-image-extra-4.4.0-109-generic", " linux-image-extra-4.4.0-112-generic linux-image-extra-4.4.0-116-generic", " linux-image-extra-4.4.0-31-generic linux-image-extra-4.4.0-87-generic", "

linux-image-extra-4.4.0-96-generic linux-image-extra-4.4.0-97-generic", " linux-image-extra-4.4.0-98-generic", "Use 'sudo apt autoremove' to remove them.", "0 upgraded, 0 newly
installed, 0 to remove and 143 not upgraded.", "15 not fully installed or removed.", "After this operation, 0 B of additional disk space will be used.", "Setting up initramfs-tools
(0.122ubuntu8.1) ...", "update-initramfs: deferring update (trigger activated)", "Setting up linux-firmware (1.157.20) ...", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic",
"W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for
/boot/initrd.img-4.4.0-108-generic with 1.", "dpkg: error processing package linux-firmware (--configure):", " subprocess installed post-installation script returned error exit status 1",
"Setting up linux-image-4.4.0-139-generic (4.4.0-139.165) ...", "Running depmod.", "update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is a dangling linkto
/boot/initrd.img-4.4.0-138-generic", "Examining /etc/kernel/postinst.d.", "run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic",
"run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-139-generic", "W: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for
/boot/initrd.img-4.4.0-139-generic with 1.", "run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-139-generic.postinst line 1052.", "dpkg: error processing package linux-image-4.4.0-139-generic (--configure):", "
subprocess installed post-installation script returned error exit status 2", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-139-generic:",
" linux-image-extra-4.4.0-139-generic depends on linux-image-4.4.0-139-generic; however:", " Package linux-image-4.4.0-139-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-139-generic (--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems prevent configuration of
linux-image-generic:", " linux-image-generic depends on linux-image-4.4.0-139-generic; however:", " Package linux-image-4.4.0-139-generic is not configured yet.", " linux-image-generic
depends on linux-image-extra-4.4.0-139-generic; however:", " Package linux-image-extra-4.4.0-139-generic is not configured yet.", " linux-image-generic depends on linux-firmware;
however:", " Package linux-firmware is not configured yet.", "", "dpkg: error processing package linux-image-generic (--configure):", " dependency problems - leaving unconfigured",
"dpkg: dependency problems prevent configuration of linux-generic:", " linux-generic depends on linux-image-generic (= 4.4.0.139.145); however:", " Package linux-image-generic is not
configured yet.", "", "dpkg: error processing package linux-generic (--configure):", " dependency problems - leaving unconfigured", "Setting up linux-image-4.4.0-109-generic
(4.4.0-109.132) ...", "Internal Error: Could not find image (/boot/vmlinuz-4.4.0-109-generic)", "dpkg: error processing package linux-image-4.4.0-109-generic (--configure):", "
subprocess installed post-installation script returned error exit status 2", "Setting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...", "Internal Error: Could not find image
(/boot/vmlinuz-4.4.0-112-generic)", "dpkg: error processing package linux-image-4.4.0-112-generic (--configure):", " subprocess installed post-installation script returned error exit
status 2", "Setting up linux-image-4.4.0-116-generic (4.4.0-116.140) ...", "Running depmod.", "update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is
a dangling linkto /boot/initrd.img-4.4.0-139-generic", "Examining /etc/kernel/postinst.d.", "run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-116-generic
/boot/vmlinuz-4.4.0-116-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic", "update-initramfs: Generating
/boot/initrd.img-4.4.0-116-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1",
"update-initramfs: failed for /boot/initrd.img-4.4.0-116-generic with 1.", "run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process
/etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-116-generic.postinst line 1052.", "dpkg: error processing package linux-image-4.4.0-116-generic (--configure):",
" subprocess installed post-installation script returned error exit status 2", "Setting up linux-image-4.4.0-138-generic (4.4.0-138.164) ...", "Running depmod.",
"update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-116-generic", "Examining /etc/kernel/postinst.d.",
"run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-138-generic /boot/vmlinuz-4.4.0-138-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools
4.4.0-138-generic /boot/vmlinuz-4.4.0-138-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-138-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "",
"gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-138-generic with 1.",
"run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-138-generic.postinst line
1052.", "dpkg: error processing package linux-image-4.4.0-138-generic (--configure):", " subprocess installed post-installation script returned error exit status 2",
"Setting up linux-image-extra-4.4.0-108-generic (4.4.0-108.131) ...", "depmod: FATAL: could not load /boot/System.map-4.4.0-108-generic: No such file or directory",
"run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-108-generic /boot/vmlinuz-4.4.0-108-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools
4.4.0-108-generic /boot/vmlinuz-4.4.0-108-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "",
"gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.",
"run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "dpkg: error processing package linux-image-extra-4.4.0-108-generic (--configure):",
" subprocess installed post-installation script returned error exit status 1", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-109-generic:",
" linux-image-extra-4.4.0-109-generic depends on linux-image-4.4.0-109-generic; however:", " Package linux-image-4.4.0-109-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-109-generic (--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems
prevent configuration of linux-image-extra-4.4.0-112-generic:", " linux-image-extra-4.4.0-112-generic depends on linux-image-4.4.0-112-generic; however:", " Package
linux-image-4.4.0-112-generic is not configured yet.", "", "dpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):", " dependency problems
- leaving unconfigured", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-116-generic:", " linux-image-extra-4.4.0-116-generic depends on
linux-image-4.4.0-116-generic; however:", " Package linux-image-4.4.0-116-generic is not configured yet.", "", "dpkg: error processing package linux-image-extra-4.4.0-116-generic
(--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-138-generic:", "
linux-image-extra-4.4.0-138-generic depends on linux-image-4.4.0-138-generic; however:", " Package linux-image-4.4.0-138-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-138-generic (--configure):", " dependency problems - leaving unconfigured", "Processing triggers for initramfs-tools
(0.122ubuntu8.1) ...", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device",
"E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.", "dpkg: error processing package initramfs-tools (--configure):",
" subprocess installed post-installation script returned error exit status 1", "Errors were encountered while processing:", " linux-firmware", " linux-image-4.4.0-139-generic",
" linux-image-extra-4.4.0-139-generic", " linux-image-generic", " linux-generic", " linux-image-4.4.0-109-generic", " linux-image-4.4.0-112-generic", " linux-image-4.4.0-116-generic",
" linux-image-4.4.0-138-generic", " linux-image-extra-4.4.0-108-generic", " linux-image-extra-4.4.0-109-generic", " linux-image-extra-4.4.0-112-generic",
" linux-image-extra-4.4.0-116-generic", " linux-image-extra-4.4.0-138-generic", " initramfs-tools"]}




When I try to install it without Ansible everything works fine until I tried to start the service




-- Unit zabbix-agent.service has begun starting up.
Nov 22 16:03:00 FRPARUDASTOH02 zabbix_agentd[2748]: zabbix_agentd [2748]: /etc/zabbix/zabbix_agentd.conf.d: [2] No such file or directory
Nov 22 16:03:00 FRPARUDASTOH02 systemd[1]: zabbix-agent.service: Control process exited, code=exited status=1
Nov 22 16:03:00 FRPARUDASTOH02 systemd[1]: Failed to start Zabbix Agent.
-- Subject: Unit zabbix-agent.service has failed
-- Defined-By: systemd




The Linux that I'm sing are Ubuntu 16










share|improve this question
















in the work I have a task to install Zabbix Agent on a list of machines using Ansible.
My problem is that the machines have some cache problems and I tried to solve it using Ansible but with no succed, I've tried using



- command: apt-get install -f
become: true



and also



- name: Update and upgrade apt packages
become: true
apt:
upgrade: yes
update_cache: yes



But always I have an pretty big error message.




fatal: [MACHINE IP]: FAILED! => {"changed": true, "cmd": ["apt-get", "install", "-f"], "delta": "0:01:13.499864", "end": "2018-11-21 17:55:11.172264", "msg": "non-zero return code",
"rc": 100, "start": "2018-11-21 17:53:57.672400", "stderr": "No apport report written because the error message indicates its a followup error from a previous failure.nNo apport report
written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport
report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo
apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo
apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynNo apport report written because MaxReports is reached alreadynE:
Sub-process /usr/bin/dpkg returned an error code (1)", "stderr_lines": ["No apport report written because the error message indicates its a followup error from a previous failure.",
"No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached
already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports
is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because
MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written because MaxReports is reached already", "No apport report written
because MaxReports is reached already", "E: Sub-process /usr/bin/dpkg returned an error code (1)"], "stdout": "Reading package lists...nBuilding dependency tree...nReading state
information...nThe following packages were automatically installed and are no longer required:n libcurl3 linux-headers-4.4.0-101 linux-headers-4.4.0-101-genericn

linux-headers-4.4.0-103 linux-headers-4.4.0-103-genericn linux-headers-4.4.0-104 linux-headers-4.4.0-104-genericn linux-headers-4.4.0-109 linux-headers-4.4.0-109-genericn

linux-headers-4.4.0-112 linux-headers-4.4.0-112-genericn linux-headers-4.4.0-116 linux-headers-4.4.0-116-genericn linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic
linux-headers-4.4.0-87n linux-headers-4.4.0-87-generic linux-headers-4.4.0-96n linux-headers-4.4.0-96-generic linux-headers-4.4.0-97n linux-headers-4.4.0-97-generic
linux-headers-4.4.0-98n linux-headers-4.4.0-98-generic linux-image-4.4.0-101-genericn linux-image-4.4.0-103-generic linux-image-4.4.0-104-genericn

linux-image-4.4.0-109-generic linux-image-4.4.0-112-genericn linux-image-4.4.0-116-generic linux-image-4.4.0-31-genericn linux-image-4.4.0-87-generic
linux-image-4.4.0-96-genericn linux-image-4.4.0-97-generic linux-image-4.4.0-98-genericn linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-103-genericn

linux-image-extra-4.4.0-104-generic linux-image-extra-4.4.0-109-genericn linux-image-extra-4.4.0-112-generic linux-image-extra-4.4.0-116-genericn

linux-image-extra-4.4.0-31-generic linux-image-extra-4.4.0-87-genericn linux-image-extra-4.4.0-96-generic linux-image-extra-4.4.0-97-genericn

linux-image-extra-4.4.0-98-genericnUse 'sudo apt autoremove' to remove them.n0 upgraded, 0 newly installed, 0 to remove and 143 not upgraded.n15 not fully installed or removed.nAfter
this operation, 0 B of additional disk space will be used.nSetting up initramfs-tools (0.122ubuntu8.1) ...rnupdate-initramfs: deferring update (trigger activated)rnSetting up
linux-firmware (1.157.20) ...rnupdate-initramfs: Generating /boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on
devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rndpkg: error processing package linux-firmware
(--configure):rn subprocess installed post-installation script returned error exit status 1rnSetting up linux-image-4.4.0-139-generic (4.4.0-139.165)
...rnRunning depmod.rnupdate-initramfs: deferring update (hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-138-genericrnExamining
/etc/kernel/postinst.d.rnrun-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericrnrun-parts:
executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-139-genericrnW: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for
/boot/initrd.img-4.4.0-139-generic with 1.rnrun-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-139-generic.postinst line 1052.rndpkg: error processing package linux-image-4.4.0-139-generic (--configure):rn subprocess installed post-installation
script returned error exit status 2rndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-139-generic:rn linux-image-extra-4.4.0-139-generic
depends on linux-image-4.4.0-139-generic; however:rn Package linux-image-4.4.0-139-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-139-generic
(--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of linux-image-generic:rn linux-image-generic
depends on linux-image-4.4.0-139-generic; however:rn Package linux-image-4.4.0-139-generic is not configured yet.rn linux-image-generic depends on linux-image-extra-4.4.0-139-generic;
however:rn Package linux-image-extra-4.4.0-139-generic is not configured yet.rn linux-image-generic depends on linux-firmware; however:rn Package linux-firmware is not
configured yet.rnrndpkg: error processing package linux-image-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of
linux-generic:rn linux-generic depends on linux-image-generic (= 4.4.0.139.145); however:rn Package linux-image-generic is not configured yet.rnrndpkg: error processing package
linux-generic (--configure):rn dependency problems - leaving unconfiguredrnSetting up linux-image-4.4.0-109-generic (4.4.0-109.132) ...rnInternal Error: Could not find image
(/boot/vmlinuz-4.4.0-109-generic)rndpkg: error processing package linux-image-4.4.0-109-generic (--configure):rn subprocess installed post-installation script returned error exit
status 2rnSetting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...rnInternal Error: Could not find image (/boot/vmlinuz-4.4.0-112-generic)rndpkg: error processing package
linux-image-4.4.0-112-generic (--configure):rn subprocess installed post-installation script returned error exit status 2rnSetting up linux-image-4.4.0-116-generic (4.4.0-116.140)
...rnRunning depmod.rnupdate-initramfs: deferring update (hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-139-genericrnExamining
/etc/kernel/postinst.d.rnrun-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-genericrnrun-parts: executing
/etc/kernel/postinst.d/initramfs-tools 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-116-genericrnW: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for
/boot/initrd.img-4.4.0-116-generic with 1.rnrun-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-116-generic.postinst line 1052.rndpkg: error processing package linux-image-4.4.0-116-generic (--configure):rn subprocess installed
post-installation script returned error exit status 2rnSetting up linux-image-4.4.0-138-generic (4.4.0-138.164) ...rnRunning depmod.rnupdate-initramfs: deferring update
(hook will be called later)rnThe link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-116-genericrnExamining /etc/kernel/postinst.d.rnrun-parts:
executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-138-generic /boot/vmlinuz-4.4.0-138-genericrnrun-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-138-generic
/boot/vmlinuz-4.4.0-138-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-138-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout:
No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-138-generic with 1.rnrun-parts:
/etc/kernel/postinst.d/initramfs-tools exited with return code 1rnFailed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-138-generic.postinst line
1052.rndpkg: error processing package linux-image-4.4.0-138-generic (--configure):rn subprocess installed post-installation script returned error exit status 2rnSetting up
linux-image-extra-4.4.0-108-generic (4.4.0-108.131) ...rndepmod: FATAL: could not load /boot/System.map-4.4.0-108-generic: No such file or directoryrnrun-parts: executing
/etc/kernel/postinst.d/apt-auto-removal 4.4.0-108-generic /boot/vmlinuz-4.4.0-108-genericrnrun-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-108-generic
/boot/vmlinuz-4.4.0-108-genericrnupdate-initramfs: Generating /boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip:
stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip 1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rnrun-parts:
/etc/kernel/postinst.d/initramfs-tools exited with return code 1rndpkg: error processing package linux-image-extra-4.4.0-108-generic (--configure):rn subprocess
installed post-installation script returned error exit status 1rndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-109-generic:rn
linux-image-extra-4.4.0-109-generic depends on linux-image-4.4.0-109-generic; however:rn Package linux-image-4.4.0-109-generic is not configured yet.rnrndpkg:
error processing package linux-image-extra-4.4.0-109-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency problems prevent configuration of
linux-image-extra-4.4.0-112-generic:rn linux-image-extra-4.4.0-112-generic depends on linux-image-4.4.0-112-generic; however:rn Package linux-image-4.4.0-112-generic is
not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):rn dependency problems - leaving unconfiguredrndpkg: dependency
problems prevent configuration of linux-image-extra-4.4.0-116-generic:rn linux-image-extra-4.4.0-116-generic depends on linux-image-4.4.0-116-generic; however:rn

Package linux-image-4.4.0-116-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-116-generic (--configure):rn dependency problems -
leaving unconfiguredrndpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-138-generic:rn linux-image-extra-4.4.0-138-generic depends on
linux-image-4.4.0-138-generic; however:rn Package linux-image-4.4.0-138-generic is not configured yet.rnrndpkg: error processing package linux-image-extra-4.4.0-138-generic
(--configure):rn dependency problems - leaving unconfiguredrnProcessing triggers for initramfs-tools (0.122ubuntu8.1) ...rnupdate-initramfs: Generating
/boot/initrd.img-4.4.0-108-genericrnW: mdadm: /etc/mdadm/mdadm.conf defines no arrays.rnrngzip: stdout: No space left on devicernE: mkinitramfs failure cpio 141 gzip
1rnupdate-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.rndpkg: error processing package initramfs-tools (--configure):rn subprocess installed post-installation
script returned error exit status 1rnErrors were encountered while processing:rn linux-firmwarern linux-image-4.4.0-139-genericrn linux-image-extra-4.4.0-139-genericrn
linux-image-genericrn linux-genericrn linux-image-4.4.0-109-genericrn linux-image-4.4.0-112-genericrn linux-image-4.4.0-116-genericrn linux-image-4.4.0-138-genericrn
linux-image-extra-4.4.0-108-genericrn linux-image-extra-4.4.0-109-genericrn linux-image-extra-4.4.0-112-genericrn linux-image-extra-4.4.0-116-genericrn
linux-image-extra-4.4.0-138-genericrn initramfs-tools", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...",
"The following packages were automatically installed and are no longer required:", " libcurl3 linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic", " linux-headers-4.4.0-103
linux-headers-4.4.0-103-generic", " linux-headers-4.4.0-104 linux-headers-4.4.0-104-generic", " linux-headers-4.4.0-109 linux-headers-4.4.0-109-generic", "

linux-headers-4.4.0-112 linux-headers-4.4.0-112-generic", " linux-headers-4.4.0-116 linux-headers-4.4.0-116-generic", " linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic
linux-headers-4.4.0-87", " linux-headers-4.4.0-87-generic linux-headers-4.4.0-96", " linux-headers-4.4.0-96-generic linux-headers-4.4.0-97", " linux-headers-4.4.0-97-generic
linux-headers-4.4.0-98", " linux-headers-4.4.0-98-generic linux-image-4.4.0-101-generic", " linux-image-4.4.0-103-generic linux-image-4.4.0-104-generic", "

linux-image-4.4.0-109-generic linux-image-4.4.0-112-generic", " linux-image-4.4.0-116-generic linux-image-4.4.0-31-generic", " linux-image-4.4.0-87-generic linux-image-4.4.0-96-generic", "

linux-image-4.4.0-97-generic linux-image-4.4.0-98-generic", " linux-image-extra-4.4.0-101-generic linux-image-extra-4.4.0-103-generic", " linux-image-extra-4.4.0-104-generic
linux-image-extra-4.4.0-109-generic", " linux-image-extra-4.4.0-112-generic linux-image-extra-4.4.0-116-generic", " linux-image-extra-4.4.0-31-generic linux-image-extra-4.4.0-87-generic", "

linux-image-extra-4.4.0-96-generic linux-image-extra-4.4.0-97-generic", " linux-image-extra-4.4.0-98-generic", "Use 'sudo apt autoremove' to remove them.", "0 upgraded, 0 newly
installed, 0 to remove and 143 not upgraded.", "15 not fully installed or removed.", "After this operation, 0 B of additional disk space will be used.", "Setting up initramfs-tools
(0.122ubuntu8.1) ...", "update-initramfs: deferring update (trigger activated)", "Setting up linux-firmware (1.157.20) ...", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic",
"W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for
/boot/initrd.img-4.4.0-108-generic with 1.", "dpkg: error processing package linux-firmware (--configure):", " subprocess installed post-installation script returned error exit status 1",
"Setting up linux-image-4.4.0-139-generic (4.4.0-139.165) ...", "Running depmod.", "update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is a dangling linkto
/boot/initrd.img-4.4.0-138-generic", "Examining /etc/kernel/postinst.d.", "run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic",
"run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-139-generic /boot/vmlinuz-4.4.0-139-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-139-generic", "W: mdadm:
/etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for
/boot/initrd.img-4.4.0-139-generic with 1.", "run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process /etc/kernel/postinst.d at
/var/lib/dpkg/info/linux-image-4.4.0-139-generic.postinst line 1052.", "dpkg: error processing package linux-image-4.4.0-139-generic (--configure):", "
subprocess installed post-installation script returned error exit status 2", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-139-generic:",
" linux-image-extra-4.4.0-139-generic depends on linux-image-4.4.0-139-generic; however:", " Package linux-image-4.4.0-139-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-139-generic (--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems prevent configuration of
linux-image-generic:", " linux-image-generic depends on linux-image-4.4.0-139-generic; however:", " Package linux-image-4.4.0-139-generic is not configured yet.", " linux-image-generic
depends on linux-image-extra-4.4.0-139-generic; however:", " Package linux-image-extra-4.4.0-139-generic is not configured yet.", " linux-image-generic depends on linux-firmware;
however:", " Package linux-firmware is not configured yet.", "", "dpkg: error processing package linux-image-generic (--configure):", " dependency problems - leaving unconfigured",
"dpkg: dependency problems prevent configuration of linux-generic:", " linux-generic depends on linux-image-generic (= 4.4.0.139.145); however:", " Package linux-image-generic is not
configured yet.", "", "dpkg: error processing package linux-generic (--configure):", " dependency problems - leaving unconfigured", "Setting up linux-image-4.4.0-109-generic
(4.4.0-109.132) ...", "Internal Error: Could not find image (/boot/vmlinuz-4.4.0-109-generic)", "dpkg: error processing package linux-image-4.4.0-109-generic (--configure):", "
subprocess installed post-installation script returned error exit status 2", "Setting up linux-image-4.4.0-112-generic (4.4.0-112.135) ...", "Internal Error: Could not find image
(/boot/vmlinuz-4.4.0-112-generic)", "dpkg: error processing package linux-image-4.4.0-112-generic (--configure):", " subprocess installed post-installation script returned error exit
status 2", "Setting up linux-image-4.4.0-116-generic (4.4.0-116.140) ...", "Running depmod.", "update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is
a dangling linkto /boot/initrd.img-4.4.0-139-generic", "Examining /etc/kernel/postinst.d.", "run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-116-generic
/boot/vmlinuz-4.4.0-116-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic", "update-initramfs: Generating
/boot/initrd.img-4.4.0-116-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1",
"update-initramfs: failed for /boot/initrd.img-4.4.0-116-generic with 1.", "run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process
/etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-116-generic.postinst line 1052.", "dpkg: error processing package linux-image-4.4.0-116-generic (--configure):",
" subprocess installed post-installation script returned error exit status 2", "Setting up linux-image-4.4.0-138-generic (4.4.0-138.164) ...", "Running depmod.",
"update-initramfs: deferring update (hook will be called later)", "The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-116-generic", "Examining /etc/kernel/postinst.d.",
"run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-138-generic /boot/vmlinuz-4.4.0-138-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools
4.4.0-138-generic /boot/vmlinuz-4.4.0-138-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-138-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "",
"gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-138-generic with 1.",
"run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-138-generic.postinst line
1052.", "dpkg: error processing package linux-image-4.4.0-138-generic (--configure):", " subprocess installed post-installation script returned error exit status 2",
"Setting up linux-image-extra-4.4.0-108-generic (4.4.0-108.131) ...", "depmod: FATAL: could not load /boot/System.map-4.4.0-108-generic: No such file or directory",
"run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-108-generic /boot/vmlinuz-4.4.0-108-generic", "run-parts: executing /etc/kernel/postinst.d/initramfs-tools
4.4.0-108-generic /boot/vmlinuz-4.4.0-108-generic", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "",
"gzip: stdout: No space left on device", "E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.",
"run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1", "dpkg: error processing package linux-image-extra-4.4.0-108-generic (--configure):",
" subprocess installed post-installation script returned error exit status 1", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-109-generic:",
" linux-image-extra-4.4.0-109-generic depends on linux-image-4.4.0-109-generic; however:", " Package linux-image-4.4.0-109-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-109-generic (--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems
prevent configuration of linux-image-extra-4.4.0-112-generic:", " linux-image-extra-4.4.0-112-generic depends on linux-image-4.4.0-112-generic; however:", " Package
linux-image-4.4.0-112-generic is not configured yet.", "", "dpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):", " dependency problems
- leaving unconfigured", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-116-generic:", " linux-image-extra-4.4.0-116-generic depends on
linux-image-4.4.0-116-generic; however:", " Package linux-image-4.4.0-116-generic is not configured yet.", "", "dpkg: error processing package linux-image-extra-4.4.0-116-generic
(--configure):", " dependency problems - leaving unconfigured", "dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-138-generic:", "
linux-image-extra-4.4.0-138-generic depends on linux-image-4.4.0-138-generic; however:", " Package linux-image-4.4.0-138-generic is not configured yet.", "",
"dpkg: error processing package linux-image-extra-4.4.0-138-generic (--configure):", " dependency problems - leaving unconfigured", "Processing triggers for initramfs-tools
(0.122ubuntu8.1) ...", "update-initramfs: Generating /boot/initrd.img-4.4.0-108-generic", "W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.", "", "gzip: stdout: No space left on device",
"E: mkinitramfs failure cpio 141 gzip 1", "update-initramfs: failed for /boot/initrd.img-4.4.0-108-generic with 1.", "dpkg: error processing package initramfs-tools (--configure):",
" subprocess installed post-installation script returned error exit status 1", "Errors were encountered while processing:", " linux-firmware", " linux-image-4.4.0-139-generic",
" linux-image-extra-4.4.0-139-generic", " linux-image-generic", " linux-generic", " linux-image-4.4.0-109-generic", " linux-image-4.4.0-112-generic", " linux-image-4.4.0-116-generic",
" linux-image-4.4.0-138-generic", " linux-image-extra-4.4.0-108-generic", " linux-image-extra-4.4.0-109-generic", " linux-image-extra-4.4.0-112-generic",
" linux-image-extra-4.4.0-116-generic", " linux-image-extra-4.4.0-138-generic", " initramfs-tools"]}




When I try to install it without Ansible everything works fine until I tried to start the service




-- Unit zabbix-agent.service has begun starting up.
Nov 22 16:03:00 FRPARUDASTOH02 zabbix_agentd[2748]: zabbix_agentd [2748]: /etc/zabbix/zabbix_agentd.conf.d: [2] No such file or directory
Nov 22 16:03:00 FRPARUDASTOH02 systemd[1]: zabbix-agent.service: Control process exited, code=exited status=1
Nov 22 16:03:00 FRPARUDASTOH02 systemd[1]: Failed to start Zabbix Agent.
-- Subject: Unit zabbix-agent.service has failed
-- Defined-By: systemd




The Linux that I'm sing are Ubuntu 16







linux ansible






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 15:30







juanma delgado

















asked Nov 21 '18 at 14:33









juanma delgadojuanma delgado

11




11








  • 2





    What specific errors did you encounter when trying to install it without Ansible? What specific errors did you encounter when trying to install it with Ansible? Your question needs more details on the errors. Please check out the FAQ on how to ask good questions.

    – Michael Gardner
    Nov 21 '18 at 14:49






  • 1





    some cache problems what cache problems? pretty big error message. what error message?

    – Kamil Cuk
    Nov 21 '18 at 14:55








  • 1





    Hi welcome to stack overflow. Here is some info on asking a good question How to Ask. Also as indentation is important in yaml and Ansible formatting your code correctly would be useful in addition to adding the error you received.

    – Peter Halligan
    Nov 21 '18 at 21:51











  • Read the error message and act occordingly. zabbix packages are sometimes unmaintained cause they change sometimes often, create the /etc/zabbix/zabbix_agentd.conf.d directory or remove the include statemtnt from /etc/zabbix/zabbix_agent(d?).conf configuration file. Do you run your ansible with root permissions on the other machine? If not, you might get No space left on device errors, maybe. And you better cleanup those unnedded kernel packages - they just use up space.

    – Kamil Cuk
    Nov 22 '18 at 21:11
















  • 2





    What specific errors did you encounter when trying to install it without Ansible? What specific errors did you encounter when trying to install it with Ansible? Your question needs more details on the errors. Please check out the FAQ on how to ask good questions.

    – Michael Gardner
    Nov 21 '18 at 14:49






  • 1





    some cache problems what cache problems? pretty big error message. what error message?

    – Kamil Cuk
    Nov 21 '18 at 14:55








  • 1





    Hi welcome to stack overflow. Here is some info on asking a good question How to Ask. Also as indentation is important in yaml and Ansible formatting your code correctly would be useful in addition to adding the error you received.

    – Peter Halligan
    Nov 21 '18 at 21:51











  • Read the error message and act occordingly. zabbix packages are sometimes unmaintained cause they change sometimes often, create the /etc/zabbix/zabbix_agentd.conf.d directory or remove the include statemtnt from /etc/zabbix/zabbix_agent(d?).conf configuration file. Do you run your ansible with root permissions on the other machine? If not, you might get No space left on device errors, maybe. And you better cleanup those unnedded kernel packages - they just use up space.

    – Kamil Cuk
    Nov 22 '18 at 21:11










2




2





What specific errors did you encounter when trying to install it without Ansible? What specific errors did you encounter when trying to install it with Ansible? Your question needs more details on the errors. Please check out the FAQ on how to ask good questions.

– Michael Gardner
Nov 21 '18 at 14:49





What specific errors did you encounter when trying to install it without Ansible? What specific errors did you encounter when trying to install it with Ansible? Your question needs more details on the errors. Please check out the FAQ on how to ask good questions.

– Michael Gardner
Nov 21 '18 at 14:49




1




1





some cache problems what cache problems? pretty big error message. what error message?

– Kamil Cuk
Nov 21 '18 at 14:55







some cache problems what cache problems? pretty big error message. what error message?

– Kamil Cuk
Nov 21 '18 at 14:55






1




1





Hi welcome to stack overflow. Here is some info on asking a good question How to Ask. Also as indentation is important in yaml and Ansible formatting your code correctly would be useful in addition to adding the error you received.

– Peter Halligan
Nov 21 '18 at 21:51





Hi welcome to stack overflow. Here is some info on asking a good question How to Ask. Also as indentation is important in yaml and Ansible formatting your code correctly would be useful in addition to adding the error you received.

– Peter Halligan
Nov 21 '18 at 21:51













Read the error message and act occordingly. zabbix packages are sometimes unmaintained cause they change sometimes often, create the /etc/zabbix/zabbix_agentd.conf.d directory or remove the include statemtnt from /etc/zabbix/zabbix_agent(d?).conf configuration file. Do you run your ansible with root permissions on the other machine? If not, you might get No space left on device errors, maybe. And you better cleanup those unnedded kernel packages - they just use up space.

– Kamil Cuk
Nov 22 '18 at 21:11







Read the error message and act occordingly. zabbix packages are sometimes unmaintained cause they change sometimes often, create the /etc/zabbix/zabbix_agentd.conf.d directory or remove the include statemtnt from /etc/zabbix/zabbix_agent(d?).conf configuration file. Do you run your ansible with root permissions on the other machine? If not, you might get No space left on device errors, maybe. And you better cleanup those unnedded kernel packages - they just use up space.

– Kamil Cuk
Nov 22 '18 at 21:11














1 Answer
1






active

oldest

votes


















1














There are lots of stdout: No space left on device messages in that log.
Your /var may be full and causing numerous issues.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53414369%2fproblems-with-ansible%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    There are lots of stdout: No space left on device messages in that log.
    Your /var may be full and causing numerous issues.






    share|improve this answer




























      1














      There are lots of stdout: No space left on device messages in that log.
      Your /var may be full and causing numerous issues.






      share|improve this answer


























        1












        1








        1







        There are lots of stdout: No space left on device messages in that log.
        Your /var may be full and causing numerous issues.






        share|improve this answer













        There are lots of stdout: No space left on device messages in that log.
        Your /var may be full and causing numerous issues.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 22 '18 at 20:50









        rakesh_singhrakesh_singh

        615




        615
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53414369%2fproblems-with-ansible%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

            SQL update select statement

            'app-layout' is not a known element: how to share Component with different Modules