diff --git a/roles/ubuntu/files/pbuilderrc b/roles/ubuntu/files/pbuilderrc new file mode 100644 index 0000000..1fb0038 --- /dev/null +++ b/roles/ubuntu/files/pbuilderrc @@ -0,0 +1,4 @@ +AUTO_DEBSIGN=${AUTO_DEBSIGN:-no} +HOOKDIR=/var/cache/pbuilder/hooks +DISTRIBUTION=${DISTRIBUTION:-focal} +DEBOOTSTRAPOPTS=( '--variant=buildd' ) diff --git a/roles/ubuntu/tasks/build-env.yml b/roles/ubuntu/tasks/build-env.yml new file mode 100644 index 0000000..d2a72bd --- /dev/null +++ b/roles/ubuntu/tasks/build-env.yml @@ -0,0 +1,29 @@ +--- +- name: Install build environment packages + become: true + apt: + name: '{{ packages }}' + state: present + force_apt_get: yes + vars: + packages: + - build-essential + - debhelper + - debootstrap + - devscripts + - dh-make + - fakeroot + - pbuilder +- name: Copy pbuilderrc + become: true + copy: + src: pbuilderrc + dest: /etc/pbuilderrc +- name: Set permissions on /var/cache/pbuilder/result + become: true + file: + path: /var/cache/pbuilder/result + state: directory + owner: root + group: root + mode: '1777' diff --git a/roles/ubuntu/tasks/main.yml b/roles/ubuntu/tasks/main.yml index 200b3c0..a301df5 100644 --- a/roles/ubuntu/tasks/main.yml +++ b/roles/ubuntu/tasks/main.yml @@ -2,5 +2,6 @@ - include: packages-cli.yml - include: packages-gui.yml when: gui == true +- include: build-env.yml - include: modules.yml - include: ssh.yml diff --git a/roles/ubuntu/tasks/packages-cli.yml b/roles/ubuntu/tasks/packages-cli.yml index e2a8db2..b6ad5b7 100644 --- a/roles/ubuntu/tasks/packages-cli.yml +++ b/roles/ubuntu/tasks/packages-cli.yml @@ -25,7 +25,6 @@ - nmap - openssh-server - packagekit - - pbuilder - python3 - python3-psutil - ruby-asciidoctor-pdf