• 0 Posts
  • 31 Comments
Joined 2 years ago
cake
Cake day: July 14th, 2023

help-circle



  • kutsyk_alexander@lemmy.worldtoLinux@lemmy.mlWhy?
    link
    fedilink
    arrow-up
    9
    ·
    2 months ago

    I switched to Linux because of Linux gaming. Yes, I am completely serious!

    Back in 2015 I had Lenovo laptop with only 2GB of RAM. Windows 7 consumed more than half of that and DotA 2 took over 2 minutes to load the map. The game was laggy. FPS was terrible even on low settings.

    On another hand Ubuntu 14.04 consumed only ~350 MB of RAM. DotA on Linux loaded map in seconds. FPS was slightly better, but the game itself didn’t feel so laggy anymore.

    Linux was (and still is) my only viable solution for gaming on low spec hardware.














  • I try some tests based on your description, and I think I got a solution. Try to use host_vars

    This is a playbook:

    ---
    - name: Test for lemmy
      hosts: your_hosts
      vars:
        networks:
          ext:
            ipv4: "127.0.0.1"
      tasks:
        - name: Use template
          ansible.builtin.template:
            src: test.j2
            dest: "/etc/iptables/rules.v4"
            owner: root
            group: root
            mode: "0644"
    

    This is a template file test.j2:

    {% for rule in rules %}
    {{ rule }}
    {% endfor %}
    

    This is a host2.yml file in a host_vars directory:

    ---
    rules:
      - "-A INPUT -p tcp -s {{ networks['ext']['ipv4'] }} --dport 6000 -j ACCEPT"
    

    For another hosts you can create separate host files with variable rules.