Vagrant up --provision fails because of ssmtp error

I’m having problems running Trellis with Vagrant and Virtualbox on Windows 10. It always ends with this error:

==> default: TASK [ssmtp : Install ssmtp] ***************************************************
==> default: System info:
==> default:   Ansible 2.0.2.0; Vagrant 1.8.5; Linux
==> default:   Trellis at "WP 4.6 Compat: set WP_HOME/SITEURL directly"
==> default: ---------------------------------------------------
==> default: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options
==> default: ::=--force-confold"   install 'ssmtp'' failed: E: Sub-process /usr/bin/dpkg
==> default: returned an error code (1)
==> default:
==> default: E: Sub-process /usr/bin/dpkg returned an error code (1)
==> default:
==> default: fatal: [192.168.50.5]: FAILED! => {"cache_update_time": 0, "cache_updated": false, "changed": false, "failed": true, "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following NEW packages will be installed:\n  ssmtp\nPreconfiguring packages ...\n0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded.\nNeed to get 0 B/42.5 kB of archives.\nAfter this operation, 2048 B of additional disk space will be used.\nSelecting previously unselected package ssmtp.\r\n(Reading database ... \r(Reading database ... 5%\r(Reading database ... 10%\r(Reading database ... 15%\r(Reading database ... 20%\r(Reading database ... 25%\r(Reading database ... 30%\r(Reading database ... 35%\r(Reading database ... 40%\r(Reading database ... 45%\r(Reading database ... 50%\r(Reading database ... 55%\r(Reading database ... 60%\r(Reading database ... 65%\r(Reading database ... 70%\r(Reading database ... 75%\r(Reading database ... 80%\r(Reading database ... 85%\r(Reading database ... 90%\r(Reading database ... 95%\r(Reading database ... 100%\r(Reading database ... 38681 files and directories currently installed.)\r\nPreparing to unpack .../ssmtp_2.64-8ubuntu1_amd64.deb ...\r\nUnpacking ssmtp (2.64-8ubuntu1) ...\r\nProcessing triggers for man-db (2.7.5-1) ...\r\nSetting up ssmtp (2.64-8ubuntu1) ...\r\nhostname: Name or service not known\r\ndpkg: error processing package ssmtp (--configure):\r\n subprocess installed post-installation script returned error exit status 1\r\nErrors were encountered while processing:\r\n ssmtp\r\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following NEW packages will be installed:", "  ssmtp", "Preconfiguring packages ...", "0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded.", "Need to get 0 B/42.5 kB of archives.", "After this operation, 2048 B of additional disk space will be used.", "Selecting previously unselected package ssmtp.", "(Reading database ... ", "(Reading database ... 5%", "(Reading database ... 10%", "(Reading database ... 15%", "(Reading database ... 20%", "(Reading database ... 25%", "(Reading database ... 30%", "(Reading database ... 35%", "(Reading database ... 40%", "(Reading database ... 45%", "(Reading database ... 50%", "(Reading database ... 55%", "(Reading database ... 60%", "(Reading database ... 65%", "(Reading database ... 70%", "(Reading database ... 75%", "(Reading database ... 80%", "(Reading database ... 85%", "(Reading database ... 90%", "(Reading database ... 95%", "(Reading database ... 100%", "(Reading database ... 38681 files and directories currently installed.)", "Preparing to unpack .../ssmtp_2.64-8ubuntu1_amd64.deb ...", "Unpacking ssmtp (2.64-8ubuntu1) ...", "Processing triggers for man-db (2.7.5-1) ...", "Setting up ssmtp (2.64-8ubuntu1) ...", "hostname: Name or service not known", "dpkg: error processing package ssmtp (--configure):", " subprocess installed post-installation script returned error exit status 1", "Errors were encountered while processing:", " ssmtp"]}
==> default:
==> default: NO MORE HOSTS LEFT *************************************************************
==> default:    to retry, use: --limit @dev.retry
==> default:
==> default: PLAY RECAP *********************************************************************
==> default: 192.168.50.5               : ok=30   changed=1    unreachable=0    failed=1
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Any thoughts on how to fix it?

Thanks

aah sorry it’s fixed - I had to add to hosts the same hostname