{"id":187,"date":"2020-01-02T10:25:58","date_gmt":"2020-01-02T10:25:58","guid":{"rendered":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/?p=187"},"modified":"2021-07-19T16:06:43","modified_gmt":"2021-07-19T15:06:43","slug":"puppet-modules-and-git-lfs-dont-go-together","status":"publish","type":"post","link":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/2020\/01\/02\/puppet-modules-and-git-lfs-dont-go-together\/","title":{"rendered":"Puppet modules and Git LFS don&#8217;t go together"},"content":{"rendered":"\n<p><strong>Intended audience:<\/strong> Puppet users<\/p>\n\n\n\n<p>I started writing a simple module to install the new <a href=\"https:\/\/techcommunity.microsoft.com\/t5\/microsoft-teams-blog\/microsoft-teams-is-now-available-on-linux\/ba-p\/1056267\">Microsoft Teams for Linux client<\/a> into Ubuntu.  In the git repo for the module, I put the <code>.deb<\/code> file into the <code>files<\/code> directory to be copied to the node prior to installation.  In order to save space in my Git repo, I thought I&#8217;d use LFS for the <code>.deb<\/code>.<\/p>\n\n\n\n<p>When testing on my test nodes, I got:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Dec 16 18:23:19 mynode puppet-agent[12958]: Execution of '\/usr\/bin\/dpkg --force-confold -i \/var\/cache\/apt\/teams_1.2.00.32451_amd64.deb' returned 1: dpkg-deb: error: '\/var\/cache\/apt\/teams_1.2.00.32451_amd64.deb' is not a Debian format archive\nDec 16 18:23:19 mynode puppet-agent[12958]: dpkg: error processing archive \/var\/cache\/apt\/teams_1.2.00.32451_amd64.deb (--install):\nDec 16 18:23:19 mynode puppet-agent[12958]:  dpkg-deb --control subprocess returned error exit status 2<\/pre>\n\n\n\n<p>Closer investigation revealed:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">puppetmaster:\/etc\/puppetlabs\/code\/environments\/master\/modules\/&gt; file teams\/files\/teams_1.2.00.32451_amd64.deb\nteams\/files\/teams_1.2.00.32451_amd64.deb: ASCII text<\/pre>\n\n\n\n<p>The short text file used by Git LFS to point to the <code>.deb<\/code> file was copied to the Puppet master instead of the <code>.deb<\/code> file.\u00a0 And yes, the text file is what ends up on the agents.<\/p>\n\n\n\n<p>ETA: the best way to use Puppet to install Teams is to add Microsoft&#8217;s Apt source and then use a package resource. <a href=\"https:\/\/github.com\/newcastleuniversity\/puppet_module_microsoft_teams\">I updated my module accordingly<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Intended audience: Puppet users I started writing a simple module to install the new Microsoft Teams for Linux client into Ubuntu. In the git repo for the module, I put the .deb file into the files directory to be copied to the node prior to installation. In order to save space in my Git repo, &hellip; <a href=\"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/2020\/01\/02\/puppet-modules-and-git-lfs-dont-go-together\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Puppet modules and Git LFS don&#8217;t go together&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1447,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-puppet"],"_links":{"self":[{"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/users\/1447"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":13,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":225,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/posts\/187\/revisions\/225"}],"wp:attachment":[{"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/helengriffiths\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}