sync with lib from ubuntu-cookbooks