From e4ef88f0d5a8feb6958e273e837d719f6d8f42d7 Mon Sep 17 00:00:00 2001 From: Carl Karsten Date: Sun, 23 Jul 2017 17:44:04 -0500 Subject: [PATCH 1/6] wget files into their own cache dir. --- scripts/mk_usb_installer.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/mk_usb_installer.sh b/scripts/mk_usb_installer.sh index e9afe0d..e399538 100755 --- a/scripts/mk_usb_installer.sh +++ b/scripts/mk_usb_installer.sh @@ -23,10 +23,14 @@ lc/playbook_repo=${playbook_repo} \\ lc/playbook_branch=${playbook_branch} \\ lc/inventory_repo=${inventory_repo} \\ lc/inventory_branch=${inventory_branch} \\ +${more_appends} \\ " appends="${preseed} partman-auto/disk=${disk} grub-installer/bootdev=${bootdev} hostname=${hostname} domain=${domain} hw-detect/load_firmware=${load_firmware} lc/playbook_repo=${playbook_repo} lc/playbook_branch=${playbook_branch} lc/inventory_repo=${inventory_repo} lc/inventory_branch=${inventory_branch} " +cache=cache/${suite} +mkdir -p ${cache}; cd ${cache} + # get and veriy the boot image # (hd-media dir because that is bunred into the SHA256SUMS file) wget -N --directory-prefix hd-media ${bootimg_loc}/hd-media/boot.img.gz @@ -41,7 +45,9 @@ curl -OJ ${iso_loc}/SHA256SUMS grep ${iso} SHA256SUMS > ${iso}.SHA256SUM sha256sum --check ${iso}.SHA256SUM -zcat hd-media/boot.img.gz|sudo dcfldd of=/dev/${dev} +cd - + +zcat ${cache}/hd-media/boot.img.gz|sudo dcfldd of=/dev/${dev} # or good ol dd # zcat boot.img.gz|sudo dd of=/dev/${dev} conv=fdatasync @@ -68,7 +74,7 @@ case $suite in *) - cp ${iso} ${iso}.SHA256SUM /media/${dev} + cp ${cache}/${iso} ${cache}/${iso}.SHA256SUM /media/${dev} cd /media/${dev} # check the iso image again, make sure it copied ok. sha256sum --check ${iso}.SHA256SUM From 5db1fd2c42dcd0436de1cc32f47b5e2986f0cf79 Mon Sep 17 00:00:00 2001 From: Carl Karsten Date: Tue, 1 Aug 2017 14:21:53 -0500 Subject: [PATCH 2/6] Add and document more_appends. --- scripts/mk_usb_installer.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/mk_usb_installer.cfg b/scripts/mk_usb_installer.cfg index c5bb726..98865b4 100755 --- a/scripts/mk_usb_installer.cfg +++ b/scripts/mk_usb_installer.cfg @@ -14,6 +14,9 @@ playbook_branch=master inventory_repo= inventory_branch= +# Anything else you want to append to the kernel. +more_appends= + # where to get installer binaries: suite=stretch From 9babdf37143b7c73107e906786752581ee314858 Mon Sep 17 00:00:00 2001 From: Carl Karsten Date: Tue, 1 Aug 2017 14:23:47 -0500 Subject: [PATCH 3/6] use a subshell to cd around in the script. --- scripts/mk_usb_installer.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/mk_usb_installer.sh b/scripts/mk_usb_installer.sh index e399538..fa3949e 100755 --- a/scripts/mk_usb_installer.sh +++ b/scripts/mk_usb_installer.sh @@ -29,7 +29,9 @@ ${more_appends} \\ appends="${preseed} partman-auto/disk=${disk} grub-installer/bootdev=${bootdev} hostname=${hostname} domain=${domain} hw-detect/load_firmware=${load_firmware} lc/playbook_repo=${playbook_repo} lc/playbook_branch=${playbook_branch} lc/inventory_repo=${inventory_repo} lc/inventory_branch=${inventory_branch} " cache=cache/${suite} -mkdir -p ${cache}; cd ${cache} +mkdir -p ${cache} + +(cd ${cache} # get and veriy the boot image # (hd-media dir because that is bunred into the SHA256SUMS file) @@ -45,7 +47,7 @@ curl -OJ ${iso_loc}/SHA256SUMS grep ${iso} SHA256SUMS > ${iso}.SHA256SUM sha256sum --check ${iso}.SHA256SUM -cd - +) zcat ${cache}/hd-media/boot.img.gz|sudo dcfldd of=/dev/${dev} # or good ol dd From cc38e3ef8d82d9195c5fd5210a8e97ebcef9c3da Mon Sep 17 00:00:00 2001 From: Carl Karsten Date: Tue, 1 Aug 2017 14:27:18 -0500 Subject: [PATCH 4/6] fix some #comments --- scripts/d-i/stretch/preseed.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/d-i/stretch/preseed.cfg b/scripts/d-i/stretch/preseed.cfg index 48933b7..23fe72c 100644 --- a/scripts/d-i/stretch/preseed.cfg +++ b/scripts/d-i/stretch/preseed.cfg @@ -1,5 +1,5 @@ -# Ansible managed -#### Contents of the preconfiguration file (for jessie) +#### Contents of the preconfiguration file (for stretch) + ### Localization # Preseeding only locale sets language, country and locale. d-i debian-installer/locale string en_US From dafbafea5e59b1b8cb0911ad07ea7b043dbcf881 Mon Sep 17 00:00:00 2001 From: Carl Karsten Date: Fri, 11 Aug 2017 17:38:14 -0500 Subject: [PATCH 5/6] Don't restart systemd-journald in the installer, it errors and aborts. --- roles/system-software/handlers/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/system-software/handlers/main.yml b/roles/system-software/handlers/main.yml index 0b80e1e..a00b3e3 100644 --- a/roles/system-software/handlers/main.yml +++ b/roles/system-software/handlers/main.yml @@ -1,3 +1,4 @@ --- - name: restart systemd-journald command: systemctl restart systemd-journald + when: ansible_connection != 'local' From c261c12d97d05a398f0b256243d866293ac2f22b Mon Sep 17 00:00:00 2001 From: Carl Karsten Date: Fri, 11 Aug 2017 18:31:27 -0500 Subject: [PATCH 6/6] parameterize publisher entity. --- roles/veyepar-secrets/defaults/main.yml | 8 +++++++- roles/veyepar-secrets/tasks/main.yml | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/roles/veyepar-secrets/defaults/main.yml b/roles/veyepar-secrets/defaults/main.yml index 2b44307..f8c70a2 100644 --- a/roles/veyepar-secrets/defaults/main.yml +++ b/roles/veyepar-secrets/defaults/main.yml @@ -3,5 +3,11 @@ user_name: videoteam # Dir that contains workin veyepar checkout with secrets in place -# like on a developer's laptop +# like on a developer's laptop, +# best to pass this on the command line: +# --extra-vars="{'veyepar_confs': '/home/carl/src/veyepar'}" # veyepar_confs: /home/carl/src/veyepar + +# Entity that produces and uploads, like DebConf Video Team, or NDV. +# used for credits image and upload credentials +publisher: dcvt diff --git a/roles/veyepar-secrets/tasks/main.yml b/roles/veyepar-secrets/tasks/main.yml index ce526d2..846564f 100644 --- a/roles/veyepar-secrets/tasks/main.yml +++ b/roles/veyepar-secrets/tasks/main.yml @@ -10,8 +10,8 @@ with_items: - dj/dj/local_settings.py # db pw, smtp - dj/scripts/pw.py # conf site, twitter, swift ... - - dj/scripts/client_secrets.json # youtube - # - dj/scripts/oauth2-{{ org }}.json # youtube (not really needed?) + - dj/scripts/client_secrets.json # youtube app keys (for veyepar?) - dj/scripts/bling/{{ org }}/ # secret title.svg :p - - dj/scripts/bling/ndv-169.png + - dj/scripts/bling/{{ publisher }}-169.png # credits slide + - dj/scripts/oauth2-{{ publisher }}.json # youtube credentials when: veyepar_confs is defined