aboutsummaryrefslogtreecommitdiff
path: root/gerboweb/deploy/bootstrap_arch_container.yml
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2020-12-30 13:12:06 +0100
committerjaseg <git@jaseg.net>2020-12-30 13:12:06 +0100
commitc6b1c2225d1ac4ac647950be8667b5709b0033a1 (patch)
tree8db7a14649a277d236791e1c731d98af03a0af88 /gerboweb/deploy/bootstrap_arch_container.yml
parente290ac758b02a9d03bacd511c87fc997db41d0a8 (diff)
downloadgerbolyze-master.tar.gz
gerbolyze-master.tar.bz2
gerbolyze-master.zip
remove ansible scripts, they are now in their own "infra" repoHEADmaster
Diffstat (limited to 'gerboweb/deploy/bootstrap_arch_container.yml')
-rw-r--r--gerboweb/deploy/bootstrap_arch_container.yml63
1 files changed, 0 insertions, 63 deletions
diff --git a/gerboweb/deploy/bootstrap_arch_container.yml b/gerboweb/deploy/bootstrap_arch_container.yml
deleted file mode 100644
index dfe677b..0000000
--- a/gerboweb/deploy/bootstrap_arch_container.yml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- name: Set local path facts
- set_fact:
- image: "/var/lib/machines/{{ container }}.img"
- root: "/var/lib/machines/{{ container }}"
- "{{container}}_root": "/var/lib/machines/{{ container }}"
-
-- name: Create container image file
- command: truncate -s 4G "{{image}}"
- args:
- creates: "{{image}}"
- register: create_container
-
-- name: Download arch bootstrap image
- get_url:
- url: http://mirror.rackspace.com/archlinux/iso/2020.03.01/archlinux-bootstrap-2020.03.01-x86_64.tar.gz
- dest: /tmp/arch-bootstrap.tar.xz
- checksum: sha256:49c7aa8718e48f5a4ec570624520fa50616ed3e044af101ec3aa16c155136f82
- when: create_container is changed
-
-- name: Create container image filesystem
- filesystem:
- dev: "{{image}}"
- fstype: btrfs
-
-- name: Create container image fstab entry
- mount:
- src: "{{image}}"
- path: "{{root}}"
- state: mounted
- fstype: btrfs
- opts: loop
-
-- name: Unpack bootstrap image
- unarchive:
- remote_src: yes
- src: /tmp/arch-bootstrap.tar.xz
- dest: "{{root}}"
- extra_opts: --strip-components=1
- creates: "{{root}}/etc"
-
-- name: Copy mirrorlist into container
- copy:
- src: mirrorlist
- dest: "{{root}}/etc/pacman.d/mirrorlist"
-
-- name: Initialize container pacman keyring
- shell: arch-chroot "{{root}}" pacman-key --init && arch-chroot "{{root}}" pacman-key --populate archlinux
- args:
- creates: "{{root}}/etc/pacman.d/gnupg"
-
-- name: Fixup pacman.conf for pacman to work in chroot without its own root fs
- lineinfile:
- path: "{{root}}/etc/pacman.conf"
- regexp: '^CheckSpace'
- line: '#CheckSpace'
-
-- name: Update container keyring
- shell: arch-chroot "{{root}}" pacman -Sy --noconfirm archlinux-keyring
-
-- name: Update container and install software
- shell: arch-chroot "{{root}}" pacman -Syu --noconfirm
-