Helix

joined 3 years ago
MODERATOR OF
[–] Helix@feddit.de 1 points 8 months ago* (last edited 8 months ago) (1 children)

Which car is it? How many km on the odometer?

[–] Helix@feddit.de 2 points 8 months ago

which one do I download for Arch?

[–] Helix@feddit.de 3 points 8 months ago

Wir haben uns von unseren Familien verabschiedet

ahahahahahaha diese Cosplayer scheißen sich doch ein, sobald sie den ersten Schlagstock in die Fresse bekommen :D

[–] Helix@feddit.de 10 points 8 months ago

Anzeige wegen vorsätzlicher gefährlicher Körperverletzung sollte da doch drin sein?

Aber die Klimakleber sind das Problem weil eventuell mal ein Krankenwagen mit einer Radfahrerin drin im Stau gestanden haben soll oder sowas.

[–] Helix@feddit.de 19 points 8 months ago (2 children)

We hate Microsoft. Long live RMS and the flying spaghetti monster!

[–] Helix@feddit.de 1 points 8 months ago (1 children)

Natürlich ging es mir nicht um Privatiere sondern um Leute deren Rente die primäre Einkommensquelle ist.

alte Menschen als umkämpfte Wählergruppe

Da fehlt ein "reiche" zwischen "alte" und "Menschen", wahlweise ersetzt man auch "Menschen" durch "Reiche".

[–] Helix@feddit.de 4 points 8 months ago (1 children)

That's what I'd recommend. Why Google and not Aegis or another non-Google FOSS app?

[–] Helix@feddit.de 1 points 8 months ago

They kinda work as anti-death sticks for me.

[–] Helix@feddit.de 1 points 8 months ago

I work in IT and I need this.

https://roadmap.sh

[–] Helix@feddit.de 1 points 8 months ago (3 children)

Could you please go into detail?

[–] Helix@feddit.de 1 points 8 months ago

why it’s bad to eat moldy food

For starters, it's poisonous and tastes like shit.

[–] Helix@feddit.de 6 points 8 months ago (1 children)

Why do you need that? Just use one of the already existing ones like Aegis.

0
submitted 2 years ago* (last edited 2 years ago) by Helix@feddit.de to c/foss@beehaw.org
 

For developers, there is no debate. The future of the database is open source. A glance at the 2022 Stack Overflow survey of around 70,000 code-wranglers shows nearly all pros use one of the two leading open source RDBMSes, PostgreSQL (46.5 percent) or MySQL (45.7 percent), although they use other systems as well.

 

Build of Proton with the most recent bleeding-edge proton experimental WINE.

Things it contains that Valve's proton does not:

  • DXVK patched with Async, which can be toggled with DXVK_ASYNC=1
  • Additional media foundation patches for better video playback support
  • AMD FSR patches added directly to fullscreen hack that can be toggled with WINE_FULLSCREEN_FSR=1
  • FSR Fake resolution patch (details here: #52)
  • Nvidia CUDA support for phsyx and nvapi
  • Raw input mouse support
  • Fix for Mech Warrior Online
  • Fix for Asseto Corsa HUD
  • Fix for MK11 crash in single player
  • Fix for Killer Instinct Vulkan related crash
  • Fix for Cities XXL patches
  • 'protonfixes' system -- this is an automated system that applies per-game fixes (such as winetricks, envvars, EAC workarounds, overrides, etc).
  • Various upstream WINE patches backported
  • Various wine-staging patches applied as they become needed
 

Hi guys,

I have the following variable in Ansible:

additional_lvm_disks:
  persistent:
    device: xvdb
    part: 1
    crypt: yes
    logical_volumes:
      persistent_data:
        size: 100%VG
        mount: /data
  volatile_hdd:
    device: xvdc
    part: 1
    crypt: yes
    logical_volumes:
      var_cache:
        size: 50%VG
        mount: /var/cache
      var_log:
        size: 50%VG
        mount: /var/log
  volatile_ssd:
    device: xvde
    part: 1
    crypt: yes
    logical_volumes:
      tmp:
        size: 30%VG
        mount: /tmp
      volatile_data:
        size: 70%VG
        mount: /media/volatile_data

Now I want to iterate over this structure and create encrypted disks with an LVM on top. I named the PVs according to the keys, so I came up with this (which, obviously, does not work properly):

- name: Install parted
  apt:
    name: [ 'parted' ]
    state: present

- name: Install lvm2 dependency
  package:
    name: lvm2
    state: present

- name: list the devices and mounts being specified
  debug:
    msg: "{{ item.device }} - {{ item.mount }}"
  with_items: "{{ var_devices_mounts }}"

- name: Check if devices exist
  fail:
    msg: "device {{ item.value.device }} does not exist or is corrupted }} "
  when: ansible_facts['devices'][item.value.device]['size'] | length == 0
  loop: "{{ lookup('dict', additional_lvm_disks) }}"

- name: Check Secret File Creation
  command: sh -c "dd if=/dev/urandom of={{ var_keyfile_path }} bs=1024 count=4"
  args:
    chdir:   "{{ var_keyfile_dir }}"
    creates: "{{ var_keyfile_path }}"

- name: Check Secret File Permissions
  file:
    state: file
    path:  "{{ var_keyfile_path }}"
    owner: root
    group: root
    mode:  "0400"

- name: Create Partition
  parted:
    device: "/dev/{{ item.value.device }}"
    number: 1
    flags: [ lvm ]
    state: present
  loop: "{{ lookup('dict', additional_lvm_disks) }}"

- name: Create LUKS container with a passphrase
  luks_device:
    device: "/dev/{{ item.value.device }}1"
    state: "present"
    passphrase: "123456789"
  loop: "{{ lookup('dict', additional_lvm_disks) }}"

- name: Add keyfile to the LUKS container
  luks_device:
    device: "/dev/{{ item.value.device }}1"
    new_keyfile: "{{ var_keyfile_path }}"
    passphrase: "123456789"
  loop: "{{ lookup('dict', additional_lvm_disks) }}"

- name: (Create and) open LUKS container
  luks_device:
    device: "/dev/{{ item.value.device }}1"
    state: "opened"
    name: "{{ item.value.device }}1_crypt"
    keyfile: "{{ var_keyfile_path }}"
  loop: "{{ lookup('dict', additional_lvm_disks) }}"

- name: Set the options explicitly a device which must already exist
  crypttab:
    name: "{{ item.value.device }}1_crypt"
    backing_device: "/dev/{{ item.value.device }}1"
    state: present
    password: "{{ var_keyfile_path }}"
    opts: luks
  loop: "{{ lookup('dict', additional_lvm_disks) }}"

- name: Creating Volume Group
  lvg:
    vg: "{{ item.key }}"
    pvs: "/dev/mapper/{{ item.value.device }}1_crypt"
  loop: "{{ lookup('dict', additional_lvm_disks) }}"

- name: Creating Logical Volume
  lvol:
    vg: "{{ item.value.volume_group }}"
    lv:  "{{ item.key }}"
    size: 100%VG
  loop: "{{ lookup('dict', (additional_lvm_disks | dict2items | combine(recursive=True, list_merge='append')).value.logical_volumes) }}"

- name: create directorie(s)
  file:
    path: "{{ item.value.mount }}"
    state: directory
  loop: "{{ lookup('dict', (additional_lvm_disks | dict2items | combine(recursive=True, list_merge='append')).value.logical_volumes) }}"

- name: format the ext4 filesystem
  filesystem:
    fstype: ext4
    dev: "/dev/{{ item.value.volume_group }}/{{ item.key }}"
  loop: "{{ lookup('dict', (additional_lvm_disks | dict2items | combine(recursive=True, list_merge='append')).value.logical_volumes) }}"

- name: mount the lv
  mount:
    path: "{{ item.value.mount }}"
    src: "/dev/{{ item.value.volume_group }}/{{ item.key }}"
    fstype: ext4
    state: mounted
  loop: "{{ lookup('dict', (additional_lvm_disks | dict2items | combine(recursive=True, list_merge='append')).value.logical_volumes) }}"

I found that I probably need the product filter for a loop to create a cartesian product of all the volume groups and their disks as well as all the logical volumes and their volume groups, the latter looking something like this:

- { volume_group: volatile_hdd, logical_volume: var_cache, size: 50%VG }
- { volume_group: volatile_hdd, logical_volume: var_log, size: 50%VG }

Sadly I can't wrap my head around this and there are no good tutorials or examples I could find.

How do I iterate over the "monster dictionary" above to get what I want?

 

What things do you use the most which made your life more bearable? Where did you get it?

view more: ‹ prev next ›