• figjam@midwest.social
      link
      fedilink
      English
      arrow-up
      5
      ·
      3 hours ago

      I have to say, the resurgence of this energy in the last whenever has been refreshing. Can’t we all just crank our hogs?

  • CaptPretentious@lemmy.world
    link
    fedilink
    arrow-up
    34
    arrow-down
    1
    ·
    9 hours ago

    Honestly, fuck Ansible.

    It’s the dialup of automation tools. It was probably amazing 10 years ago.

    It’s YAML is awful, it scales terribly, it’s so fucking slow at literally everything, it gives people who have no clue what they’re doing a false sense of confidence.

    The number of times I’ve seen app teams waste the time of support groups and engineers because something went wrong and they didn’t have the knowledge to know why and need to waste so many man hours having other people solve it for them. I (the engineer) was added to a chat that had 15 people in it because they, after running ansible, saw errors in their server… So clearly there was a problem with the server… At no point did they question there Ansible job.

    Of the various tools I’ve used, I prefer Salt. The YAML is slightly less ass and it’s so much faster while also seeming to scaling better too. It by no means is perfect.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 hours ago

    uses vanilla ssh

    Clearly you haven’t tried automation of network devices because it constantly bitches about missing ansible-pylibssh and falls back to Paramiko

    • friend_of_satan@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      47 minutes ago

      I was going to respond that those are both wrappers to ssh, but thought I’d verify first, and TIL “Paramiko is a pure-Python [1] (3.6+) implementation of the SSHv2 protocol [2]

  • ColonelThirtyTwo@pawb.social
    link
    fedilink
    arrow-up
    41
    arrow-down
    3
    ·
    edit-2
    14 hours ago

    “Keep it simple” says the project that decided it would be great to program in YAML…

    I’ve tried using it to manage a few home servers and parameterizing anything was painful and boilerplate-ridden

    • tzrlk@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      7 hours ago

      Except it isn’t actually YAML you’re writing, it’s a jinja2 string template that parses to YAML because the expressions they came up with ended up not being sufficient.

      • JackbyDev
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 hour ago

        Mm, I love stacking weird formats. How many backslashes do I need for a regular expression to work right? 🥵

    • Funwayguy@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      13 hours ago

      Jist wait until you have to start fucking around with multiple incompatible versions of python for different targets.

        • Lichtblitz@discuss.tchncs.de
          link
          fedilink
          arrow-up
          2
          ·
          8 hours ago

          No. Because the python version of the host and the target server must loosely match up. Otherwise you get some cryptic error messages in some unexpected modules. Red Hat’s solution: just manage RHEL 9 targets from RHEL9 hosts and RHEL8 from RHEL8 hosts. There is no official way to align python versions across that major.

    • milicent_bystandr@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      After a suspicious-looking guide I nearly started with, and the NoxOS split drama, and having homemanager bork my login in a test setup, I wonder if next time I’ll try GUIX.

    • mosiacmango@lemm.ee
      link
      fedilink
      arrow-up
      13
      ·
      edit-2
      9 hours ago

      NixOS : no dudes, its not raw screeching madness, its great. Just great. So great. Please read these 17 guides that are outdated more every minute to get started. Also, dont read that guide. We don’t do that anymore, but there is no way for me to explain why unless you already know.

      Ive tried NixOS three times now, and it hasn’t took. Has anyone written a sane guide to the current iteration yet?

        • ThirdConsul@lemmy.ml
          link
          fedilink
          arrow-up
          9
          ·
          edit-2
          8 hours ago

          This is the argument I use to convince straight guys to let me bum them

          Just so you know.

        • mosiacmango@lemm.ee
          link
          fedilink
          arrow-up
          10
          ·
          9 hours ago

          Ahh, I didn’t realize we had mixed some “git gud” dark souls shit into my devops.

          But seriously, I’ll give your guide a look. Everyone should taste madness occasionally.

          • paperd@lemmy.zip
            link
            fedilink
            English
            arrow-up
            2
            ·
            8 hours ago

            I mean… You liked dark souls, right?

            Once nix clicks, you’ll know the massive missed potential that ansible is (being just another abstraction layer, and not baked into the package manager itself) and you’ll never look at ansible the same way again.

            • mosiacmango@lemm.ee
              link
              fedilink
              arrow-up
              6
              ·
              edit-2
              8 hours ago

              Sure, but that doesnt mean I want to mix its difficulty into code.

              I like fried chicken too, but i don’t try to somehow add json to it, no matter how sexy those nested brackets get.

              Good things dont all have to be sluiced together into a juicy pulp. They can be good all on their lonesome. I can “git gud” in dark souls and enjoy well documented, consistent IaC as well.

  • LordKitsuna@lemmy.world
    link
    fedilink
    arrow-up
    70
    arrow-down
    8
    ·
    17 hours ago

    Anyone that says yaml is readable is psychotic. It’s literally objectively not readable because a random white space character can break the entire thing and that’s by definition not readable I can’t see whether there’s a white space or not without explicitly setting that up in an editor

      • azertyfun@sh.itjust.works
        link
        fedilink
        arrow-up
        7
        arrow-down
        1
        ·
        13 hours ago

        Only 1.1. Which everybody has been fiercely clinging onto since 2009, because YAML 1.2 did not seem to consider it a problem that they broke backwards compatibility on that behavior. So now the only way to keep existing YAML files working is for us all to keep pretending YAML 1.2 does not exist.

          • azertyfun@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            ·
            4 hours ago

            Which versioning???

            somekey: yes
            

            Go right ahead and tell me what the YAML version is and what is the type of somekey is. Oh that’s right, it’s impossible, because the versioning is entirely up to the serializers for some godforsaken reason.

      • LordKitsuna@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        12 hours ago

        I mean sure or you could just start by using a format that’s not so painfully strict with how it’s laid out. I miss the good old INI config. It couldn’t give two shits how you format it, throw in random spaces random tabs random new lines so long as the value was correct

  • towerful
    link
    fedilink
    arrow-up
    60
    arrow-down
    4
    ·
    18 hours ago

    uses yaml for scripting so it’s clean and readable.

    Eh…

    I guess yaml is fine.
    I hate the significance of whitespace, and the fact that I cannot find any editor that can auto-format. Which are both related, I guess: there is no way to know a yaml document is actually correctly formatted without knowing the intended schema.

    Whereas JSON doesn’t have this ambiguity. But JSON has it’s own drawbacks.

    • kevincox@lemmy.ml
      link
      fedilink
      arrow-up
      25
      arrow-down
      1
      ·
      16 hours ago

      YAML is fine as a configuration language and ok data input language.

      YAML is absolutely cursed as a programming language. As in Ansible has created a really shitty programming language inside of YAML. Should be burned with fire.

      • towerful
        link
        fedilink
        arrow-up
        2
        ·
        13 hours ago

        I guess it’s like HTML if it tried to also adopt it’s own scripting language. Whereas JS interacts with the HTML DOM. Sure, it has quirks, but essentially modified a config.

        I’ve never found a nice way writing YAML with variables and configurability.
        Trying to use yaml to natively describe how a yaml config should be produced is broken. It diverges from the underlying schema, and (because it’s .yaml) isn’t distinguishable from any other yaml.
        Things like helm treat yaml as a template. And I don’t think language servers & tooling are up to scratch yet (happy to be corrected). So basic yaml formatters shit the bed.

        Yaml is a computer readable config file that tries to be human readable, and fails at being actually useful.

        Why projects try and make it useful, I will never understand.

        I honestly think generating yaml from something like python would be a million times easier.
        But then tools like ansible adopt yaml to essentially be a scripting language. As opposed to creating an actually decent solution that uses both python (to generate) and yaml (to apply).
        Or whatever language.

    • doeknius_gloek@discuss.tchncs.de
      link
      fedilink
      arrow-up
      26
      ·
      edit-2
      17 hours ago

      I kinda like YAML for simple configuration files, but the YAML spec is borderline insane.

      https://ruudvanasseldonk.com/2023/01/11/the-yaml-document-from-hell

      And don’t get me started with ansible, it never works the way I think it should and almost every playbook or role I write is a pain to get right. When it works, it’s a really nice tool and I couldn’t manage my homelab as efficiently without Ansible, but it frustrated the hell out of me way too often.

      • towerful
        link
        fedilink
        arrow-up
        3
        ·
        13 hours ago

        I feel I spend more time iterating yaml.
        There isn’t any tooling that actually helps you write it.

        I feel like there is a gap in the market for a solution that uses typescript, typed python or some other type-able scripting language, which then generates the yaml files.
        A language that has language servers, intellisense, all the modern dev tools. Schemas are provided as simple type descriptors. And whatever script you write then produces the correct result.
        Some sort of framework on top of that to provide an opinionated workflow, and some tooling to lint/validate/produce.
        And the result is yaml files which can be checked/diffed against in-place config, and version controlled for consistency.

    • thesmokingman
      link
      fedilink
      arrow-up
      1
      ·
      12 hours ago

      Are you looking for an editor that can format YAML out-of-the-box or with plugins? In my experience, most editors only support a small number of formats out of the box and extend that functionality with plugins. I have yet to find a solid, production editor without a decent YAML formatter. If you’re using one of the common commercial ones, Red Hat maintains many that work explicitly for Ansible.

      • towerful
        link
        fedilink
        arrow-up
        3
        ·
        13 hours ago

        XML is extremely verbose.
        Again, requires some other tooling to generate (I feel I can point to JavaScript for an example of XML manipulation)

        • JackbyDev
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 hour ago

          What’s funny is that if you use attributes a lot then XML can be about the same size as JSON. But people think there are things you should and shouldn’t use attributes for for some reason. The only thing XML has going for it is a really nice schema format, but even today that’s pretty moot. JSON schema and others are pretty well supported.

        • lud@lemm.ee
          link
          fedilink
          arrow-up
          2
          ·
          7 hours ago

          Yeah, reading XML without rendering it or at least with syntax highlighting is a pain.

          JSON is way nicer.

  • hushable@lemmy.world
    link
    fedilink
    arrow-up
    16
    ·
    edit-2
    15 hours ago

    I’ve been using Ansible for almost 10 years now and one thing I learned is to keep things simple, most issues I had with Ansible in the past were due to me taking the wrong approach to problem solving. In way, it forced me to not overcomplicate things.

    I’m not the biggest fan of it, but I do prefer it over other IaCs.

    edit: tbh my biggest issue with Ansible is other people who ask me “why not wrtie a bash script instead?”

  • bleistift2@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    edit-2
    17 hours ago

    Also completely parses your whole goddamn secrets file multiple times per run, so if you need to change a single server, make sure you have time.

    • moncharleskey@lemmy.zip
      link
      fedilink
      arrow-up
      12
      ·
      12 hours ago

      SSH is a network protocol for making secure connections, allowing remote access to various systems. As for why you should care, if you didn’t know what SSH was, then you probably shouldn’t care since you aren’t the target audience. It’s fringe knowledge for me too.