diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-07-11 14:39:49 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-07-11 14:39:49 +0300 |
commit | b7945407581b0e37d0f9a53352dea230989b1e78 (patch) | |
tree | 2dd8ba59a84983456f324a9a43f25d18c5961cd0 | |
parent | 23326492fcf946e03fed30531a7747ed50da6178 (diff) | |
download | ansibleness-b7945407581b0e37d0f9a53352dea230989b1e78.tar.gz |
stamina: add
Sponsored-by: author
-rw-r--r-- | ansible/hosts | 2 | ||||
-rw-r--r-- | ansible/stamina.yml (renamed from ansible/exolobe5.yml) | 69 | ||||
-rw-r--r-- | v-i/stamina-spec.yaml | 11 |
3 files changed, 48 insertions, 34 deletions
diff --git a/ansible/hosts b/ansible/hosts index 9e6f79d..f91dcd3 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -1,7 +1,7 @@ [all] exolobe1 exolobe2 -exolobe5 +stamina x220 kea puomi diff --git a/ansible/exolobe5.yml b/ansible/stamina.yml index df60554..024ad39 100644 --- a/ansible/exolobe5.yml +++ b/ansible/stamina.yml @@ -1,4 +1,4 @@ -- hosts: exolobe5 +- hosts: stamina remote_user: root roles: - sane_debian_system @@ -31,15 +31,16 @@ dest: /etc/network/interfaces.d/lo - copy: content: | + auto eth0 iface eth0 inet manual + #set up bridge and give it a static ip auto br0 iface br0 inet dhcp - bridge_ports eth0 - bridge_hw eth0 - up ip route delete 10.1.1.1 dev eth0 - up ip route delete 10.1.1.0/24 dev eth0 - up ip route delete default via 10.1.1.1 dev eth0 + bridge_ports eth0 + bridge_stp off + bridge_fd 0 + bridge_maxwait 0 dest: /etc/network/interfaces.d/br0 - name: "set permission of /mnt/vms" file: @@ -61,6 +62,8 @@ shell: | chown -R liw:liw /home/liw/ansibleness /home/liw/liw-dot-files - name: "configure liw dot files" + args: + warn: false shell: | sudo -u liw -i bash -c "pwd && ./liw-dot-files/make-symlinks" sudo -u liw -i bash -c "ln -nsf liw-dot-files/gitconfig-exolobe1 .gitconfig" @@ -78,18 +81,18 @@ owner: liw group: liw mode: 0755 - - name: "fetch cloud images" - get_url: - url: "{{ item.url }}" - dest: "/home/liw/base-images/{{ item.file }}" - owner: liw - group: liw - mode: 0644 - with_items: - - url: https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2 - file: bullseye.qcow2 - - url: https://cloud.debian.org/images/cloud/OpenStack/current-10/debian-10-openstack-amd64.qcow2 - file: buster.qcow2 + # - name: "fetch cloud images" + # get_url: + # url: "{{ item.url }}" + # dest: "/home/liw/base-images/{{ item.file }}" + # owner: liw + # group: liw + # mode: 0644 + # with_items: + # - url: https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2 + # file: bullseye.qcow2 + # - url: https://cloud.debian.org/images/cloud/OpenStack/current-10/debian-10-openstack-amd64.qcow2 + # file: buster.qcow2 - name: "create ~liw/.ssh" file: state: directory @@ -117,20 +120,20 @@ then echo >> /home/liw/.ssh/vmadm fi - - name: "create ~liw/.config/vmadm" - file: - state: directory - path: /home/liw/.config/vmadm - owner: liw - group: liw - mode: 0755 - - name: "configure vmadm" - copy: - src: vmadm.yaml - dest: /home/liw/.config/vmadm/config.yaml - owner: liw - group: liw - mode: 0644 + # - name: "create ~liw/.config/vmadm" + # file: + # state: directory + # path: /home/liw/.config/vmadm + # owner: liw + # group: liw + # mode: 0755 + # - name: "configure vmadm" + # copy: + # src: vmadm.yaml + # dest: /home/liw/.config/vmadm/config.yaml + # owner: liw + # group: liw + # mode: 0644 - name: "enable libvirt 'default' network" virt_net: name: default @@ -140,7 +143,7 @@ ansible_python_interpreter: /usr/bin/python3 sane_debian_system_version: 2 - sane_debian_system_hostname: exolobe5 + sane_debian_system_hostname: "{{ inventory_hostname}}" sane_debian_system_codename: bullseye sane_debian_system_sources_lists: - repo: | diff --git a/v-i/stamina-spec.yaml b/v-i/stamina-spec.yaml new file mode 100644 index 0000000..3eb2cf6 --- /dev/null +++ b/v-i/stamina-spec.yaml @@ -0,0 +1,11 @@ +hostname: stamina +drive: /dev/nvme0n1 +extra_drives: + - /dev/nvme1n1 +extra_lvs: + - name: vms + size: 500G + mounted: /mnt/vms +ansible_vars: + user_pub: | + ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPQe6lsTapAxiwhhEeE/ixuK+5N8esCsMWoekQqjtxjP liw personal systems |