linuxmemes

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

slazer2au, in Ansible casually administering hundreds or thousands of devices

Quick, do another one but with Terraform.

bluey, (edited )

afaik, terraform does not allow you to manage the state of an OS. Think managing motd file or ensuring certain packages are installed.

You might like to try out pulumi.

beeng, (edited )

Terraform talks to “clouds”, where as Ansible talks to devices. Whilst clouds do have many devices, I feel like Ansible has a greater ability to absorb likeness/distinctiveness (ships), over a greater scale than terraform.

slazer2au,

Terraform isn’t limited to clouds. We use it for our onprem kit.

taladar,

I don’t use Terraform but from my understanding Terraform is more for “what kind of server hardware/VM/container/… do I want” and less “which configuration do I want on that server/VM/container/…”

slazer2au,

Which kinda sounds like the Borg.

Do we want a drone, an operative, or whatever 7 of 9 is.

MigratingtoLemmy,

Wait how? What do you use? I think I’ve seen a Terraform connector for Kubernetes but that’s about it

slazer2au,

There is esxi via vsphere, Hyper-V and Proxmox providers

MigratingtoLemmy,

Ah, thanks

0x4E4F, in Average Linux user

That kinda looks like me though… wait… am I an average Linux user 🤔…

QuazarOmega,

Holy shit, Ryan Gosling uses Linux?

0x4E4F, (edited )

That kinda looks like Terry Davis, creator of TempleOS. I knew he looked familiar, just couldn’t remember who he reminded me of.

QuazarOmega,

Yes, it’s him, I was just pulling your leg for the “literally me” kind of comment
(btw, Terry is literally me (I am the best programmer that’s ever lived))

0x4E4F,

So… on what meds are you and why have you stopped taking them?

QuazarOmega,

Uhh, to follow God’s word?

0x4E4F,

Fair enough. Sooo… I guess I’ll go this way then…

siipale,

Probably an average. I think the above average types usually have a vim keybinding configured to send current buffer to CIA via curl so they don’t have to use bloated web browser for doing everyday task.

possiblylinux127, (edited ) in The pain is felt on other planets as well...

Why did you repost my meme?

Edit: Just to clarify this was suppost to be a joke as I posted this after getting it off some article a few years ago. Apologizes for not explaining.

0x4E4F,

Because it’s great! 😂

possiblylinux127,

Fair enough, to be honest with you I got it from someone a few years back.

0x4E4F,

It’s genious 😂😂😂.

Darkassassin07,
@Darkassassin07@lemmy.ca avatar

80% of social media is just reposted memes. TF are you talking about…

Just be happy people are enjoying what you’ve created. It’s not like you were being paid for it anyway.

JoMomma, (edited )

Uh oh, someone doesnt know the definition of a “meme”

azvasKvklenko, in Ansible casually administering hundreds or thousands of devices

I love Ansible while hating when people touch it. Yes, it’s very flexible but at what cost? If you actually learn it and follow some basic guidelines, you can make beautiful playbooks and inventories having wonderful automation for even complex setups while keeping it clean. But if one doesn’t care and just try to make servers go brrr, it becomes horrific glorified shell script with everything hardcoded, most tasks unaware of changes they make, cesspool of shitty templates, breaking itself in minutes, being pain to work with and making me want to delete all the shit and start all over.

Technus,

I decided I wanted nothing to do with Ansible when I was half an hour into reading the website and I still didn’t have a fucking clue what it is or exactly what it does.

To this day, I couldn’t really tell you. It seems to be basically a framework for automatically SSH’ing into machines and running shell scripts on them which doesn’t sound robust in the slightest. It’s like they took thirty years of sysadmins’ discarded spit-and-duck-tape solutions and bundled them into a “framework”.

I dunno how the fuck you’re supposed to manage cloud infrastructure at scale with that.

azvasKvklenko,

It’s far more than just SSHing and running shell scripts. Besides, I wouldn’t ever call it a „framework”.

It’s a tool for Linux, BSDs and even Windows machine setup automation in a declarative fashion. Tasks are usually built out of wide range of provided modules for both universal actions (like file edits, templating, shell commands) and very specific ones (like Podman containers, Postgres users, indexes in Mongo, whatever you imagine, you can even implement your own in Python). Those tasks have logic that can detect the status for each of the tasks in each specified nodes, so they can not only be applied, but also dry run with precise diff tracking (diff of config files to be applied, packages to be installed, etc).

It has inventory that can be both static (config file), and dynamic (e.g query an AWS account for Ec2-s or get nodes from Proxmox) that lets you group your however many hosts (by purpose, etc), attach variables to specific hosts or entire groups, or even store encrypted credentials to use them in roles. When dealing with hundreds of hosts, at some point this is something you need to do anyway, but here it really shines even with much smaller amount of machines.

Ansible can be very reliable and provide awesome environments, but it requires some learning and due to its flexibility, it can also be used badly. I have some success stories with it in last 7 years of utilizing it for both small and big business.

That being said, if you want some magic hammer that just does stuff without requiring any understanding, Ansible might not be the thing.

And no, Terraform is not an replacement for Ansible and vice versa. Those two are designed for different purposes. I actually used them together in some projects.

Technus,

And no, Terraform is not an replacement for Ansible and vice versa. Those two are designed for different purposes. I actually used them together in some projects.

Yeah, that’s the problem. Every time infrastructure management came up, a certain coworker would always bring up Ansible. It eventually got kind of annoying.

CosmicTurtle,

Yup. I used ansible for a good year, maybe two, and found myself asking, “Why the fuck am I maintaining some abstract thing when I can just write a shell script and deploy that?”

Cloud orchestration is better done with other tooling. Honestly don’t see a use case for ansible beyond physical data center deployments.

darganon,

They installed it for us at work as part of a project, and we went to ask the ansible guy wtf we could use it for in a windows world, and he couldn’t articulate how it would be an improvement in any way over a scheduled task.

taladar,

To be fair it is not Ansible’s fault that Windows does pretty much everything differently from the systems Ansible was designed for.

darganon,

Agreed entirely.

moonpiedumplings, (edited )

It appeals to me for management of a windows machine for a few things:

  • Lots of machines at once, over winrm. Although ssh is the default, as ansible is linux first.
  • I don’t have to learn powershell - the shared language means the windows teams and the linux team don’t have to learn eachother’s language. In ansible, it’s very easy to avoid the footguns that come with something like bash, especially after you install the red hat linter, ansible-lint, which warns of ansible’s own footguns.
  • easy to version control it
  • premade stuff: the official “modules” are massive and do a lot. There are also community packages: galaxy.ansible.com - of course, you should probably check any stuff you run first. But ansible is very easy to read.
  • built in secret management. Encrypt secrets, but still be able to use them smoothly with the automation framework.

For just one machine? Task scheduler is probably good enough. 2-3 machines, managed remotely? Ansible is at least worth looking at.

Edit: also, really good docs. Like, check out this active directory module with examples: docs.ansible.com/…/object_info_module.html#ansibl…

The examples are very helpful, with things like getting a list of ad users. I used that to create a ansible script to shuffle all ad user passwords - while being a a linux lover who hates windows and has literally never touched ad before this.

github.com/CSUN-CCDC/CCDC-2023/blob/…/users.yml

github.com/CSUN-CCDC/CCDC-2023/blob/…/main.yml

azvasKvklenko,

Nice, I love it

timbuck2themoon, (edited )

There is a reason ansible exists and is widely used. Shell scripts are brittle and don’t account for a ton of use cases.

For instance- are you going to write a shell script to determine the OS family of a server? Are you then going to do a bunch of if statements for things you want run on Debian hosts vs RedHat ones vs. Alpine? Are you going to manually make templates yourself or just use jinja templates and the template module in ansible (and use variables easily gathered by the setup module)? Are you going to manually select which hosts you’re going to target or are you just going to use your ansible inventory that categorizes your machines based on location or purpose or whatever other arbitrary thing and use tags? Are you going to manually dig in and find out how many NICs are in a box, what IPs they have, what CPU, how many cores so you can set some service to use “X” amount of threads, define service templates using those machine variables, etc. etc. etc.? Are you going to make such well defined shell scripts that they can be reused over and over again against a variety of machines without breaking things and make it easy to include them in parent shell scripts?

This is all stuff ansible does quite easily.

It’s not the end all be all of course. Some would argue (maybe rightfully) that Puppet or Salt can maintain config drift a bit better. I would argue it’s not the tool to use for containerization really either. But it definitely has a real purpose in initial and maintained configuration management and in both cloud and on-prem deployments.

azvasKvklenko,

Building custom images for cloud can be one. Builtins have a lot of ready to use logic that you might want in your scripts anyway

MigratingtoLemmy,

Terraform for day 0 operations is a better experience but it had its quirks. Ansible is nice when it’s done well, but when you don’t have an Ansible module for something, you’re essentially writing a shell script

Technus, (edited )

Yeah, in contrast the value proposition for Terraform was immediately obvious. “Oh, you mean I don’t have to manually set up Kubernetes clusters and shit every time we want to deploy to a new region? Fucking sign me up!”

azvasKvklenko,

Or your own module in Python if it gets too complex to do with just Ansible docs.ansible.com/…/developing_modules_general.htm…

0x4E4F, in Ansible casually administering hundreds or thousands of devices
@0x4E4F@sh.itjust.works avatar

Meeh, someone had to do the job 🤷. It’s not like there is a more flexible solution out there.

stardreamer,
@stardreamer@lemmy.blahaj.zone avatar

stares at the intern’s 400 line bash script

There are totally more flexible options. Just don’t mind the front falling off. It’s totally normal!

0x4E4F,
@0x4E4F@sh.itjust.works avatar

400 line… amateur 😒…

Neon, in Ansible casually administering hundreds or thousands of devices

NixOS Gang here

refreeze,
@refreeze@lemmy.world avatar

Yeah, it took a while getting deep into ansible hell for me to see the light.

fl42v,

More like nix in general. Unless you need to setup some windows crap

ma1w4re, in AMA

Under Ubuntu based distros, which package fixes Clangs ability to find C++ headers in Vscode

0x4E4F,
@0x4E4F@sh.itjust.works avatar

The clang-find-cpp-headers-in-vscode-dev package.

ma1w4re,

close, its libstdc+±12-dev 😔

0x4E4F,
@0x4E4F@sh.itjust.works avatar

Yeah, some distros have the acronym instead of the full name.

GiuEliNo, in interview on the frontier
@GiuEliNo@feddit.it avatar

Oh I never saw this one . Got a good laugh! Nice post!

pmjv, (edited )
@pmjv@lemmy.sdf.org avatar

Cheers! Find more over at !unix_surrealism

WeLoveCastingSpellz,

cool!

thisbenzingring,

SDF SDF!

caseyweederman,

Well I’m hooked

pmjv,
@pmjv@lemmy.sdf.org avatar

❤️

businessfish,
@businessfish@lemmy.blahaj.zone avatar

thank you for posting that here! love your stuff and wouldn’t have found it otherwise.

pmjv,
@pmjv@lemmy.sdf.org avatar

I’m grateful!

GregorTacTac, in AMA
@GregorTacTac@lemm.ee avatar

What’s a fork?

0x4E4F,
@0x4E4F@sh.itjust.works avatar

It’s an eating utensil.

GregorTacTac,
@GregorTacTac@lemm.ee avatar

How is Android a “fork” of Linux then?

0x4E4F,
@0x4E4F@sh.itjust.works avatar

Linux is an eating ustensil for Android… I don’t get the confusin.

GregorTacTac,
@GregorTacTac@lemm.ee avatar

So I eat android with Linux? Sounds about right

CaptPretentious, in AMA

What are the important, distinguishing differences between RHEL8 and REHL9 one should probably know.

laurelraven,

One is divisible by 3 and not 2, and the other is divisible by 2 and not 3

This is very important when checking if your software packages are compatible

0x4E4F,
@0x4E4F@sh.itjust.works avatar

Correct!

loudWaterEnjoyer,
@loudWaterEnjoyer@lemmy.dbzer0.com avatar

Explain this

laurelraven,

That is a high compatibility version for when you need to work with many different softwares at once

loudWaterEnjoyer,
@loudWaterEnjoyer@lemmy.dbzer0.com avatar

But it’s 4.5, which is like (9 ÷ 2) so that kinda contradicts your first statement, doesn’t it?

laurelraven,

Not at all! Since it’s half of 9, it can therefore work with half of the software RHEL 9 is compatible with, but since the 4 is also divisible by 2, it can handle all of that software as well.

It’s really quite simple, I don’t see how this could be confusing at all…

cashews_best_nut, in Hot take

There’s Two Main Choices:

Packages…

  1. Pacman-based - Arch, Arco, Endeavour
  2. RPM-based - Fedora, SuSE
  3. Aptitude-based - Ubuntu, Debian

Choose Pacman for rolling release, bleeding edge. Pick aptitude for servers and pick RPM if you want something that ‘just works’.

Desktop…

  1. Full DE - Gnome, KDE
  2. Window Manager - Awesome, i3

High end machines with lots of fancy features and ease of use pick a full DE. WM is good for speed and low-end hardware but harder to use.

FalseDiamond,
@FalseDiamond@sh.itjust.works avatar

Disagree on picking RPM distros for an absolute beginner (this is what the image is about at least). SUSE maybe but you don’t want a newbie having to deal with US patent bullshit and especially SELinux. Similarly, no newbie will ever pic a barebones WM as a first time user.

danielf,

I have used Fedora for nearly all the time I’ve daily driven Linux, and haven’t encountered any problem that a newbie would encounter and couldn’t overcome, excluding distro-agnostic stuff. Yeah, the h264 shit sucks, but if you use flatpaks you shouldn’t have to worry about it. And if you ever have to face SELinux, then you’re probably doing something that’s beyond beginner level.

cashews_best_nut,

It’s a very rough guide I threw together. There’s all sorts of wedge cases you could use to argue against it. E.g. you could use RPMs on slack Linux. Not exactly user friendly.

Bit on the whole fedora or Suse do the job.

Also desktops are better for newbies. I thought I’d mentioned that but yeah I agree deffo better for newbies while WM managers more for tinkerers/power users.

jimbolauski,

I started on CentOS and don’t remember any issues but that was a long time ago. I flirted with Suse, Ubuntu, and Arch when RH started being a super dick. I finally settled on Rocky, rpm is the devil I know.

Fox,
@Fox@pawb.social avatar

I dunno, I picked RedHat 5.2 as a complete beginner along with fvwm95 and afterstep, and that worked out okay. Of course, that was 25 years ago.

recapitated,

25 years ago the viability of options were slightly more prescriptive

JasonDJ,

Same. I remember getting interested in Linux in like 1997 or so, and it seemed like RedHat was preferred for newbies.

Of course, what were the alternatives then? It was basically Slackware (or Suse), Debian, and RedHat (or Caldera). There was no RHEL or Canonical or SElinux back then. It was a different time.

Hell one of the language packs for installing RedHat was “Redneck”. It was a gimmick to demonstrate localization options.

AngryCommieKender,

So for gaming… Pacman? I thought mint and kubuntu use aptitude, and was under the impression those are two of the better gaming distros.

I hate windows, but am sick of trying Linux every 5-6 years and finding out that I cannot get half the games I play to work. Admittedly, with you guys I might not be going it alone this time…

menemen, (edited )
@menemen@lemmy.world avatar

I’d say, just use Ubuntu if gaming is your main concern.

Imo the main problem for games are 1. hardware drivers (afaik only if you have brand new hardware), 2. game launchers (fuck those fucking game launchers, fuck; except steam) and 3. anti- cheat software.

Otherwise gaming is really good under Linux nowadays.

MonkeMischief, (edited )

The package manager is usually tied to the distro, but the point above is to let the package manager inform your distro choice.

You’ll notice a running theme in my lecture here is “choice.” You can switch Desktop Environment and other stuff on just about any distro and make it feel like yours. Switching package managers isn’t recommended though! 😅

So for instance, Arch (btw lol), or Manjaro, or Endeavour use Pacman.

I’ve switched to Endeavour recently which is essentially “User-friendly Arch-based” with an installer and stuff, and it’s absolutely lovely for games. My old 960M laptop runs plenty of stuff great. :D

On my main rig I’ve used OpenSUSE Tumbleweed for years, which is also a rolling release (constantly updated) distro that technically uses RPMs, but uses its own package manager called Zypper, which I find mostly user friendly. Packages are also a bit more thoroughly tested.

Both use KDE Plasma desktop environment and it’s gorgeous.

Alternatively, especially for laptops with hybrid Nvidia graphics, POP!_OS is alright if you’re okay with GNOME desktop environment. (You can always change, but it’s geared toward GNOME). It used Aptitude, and the updates trail behind a bit, but generally that’s supposed to make a more stable system.

(Note that when I say “lags behind”, latest security fixes tend to be backported, but you won’t see fancy new shiny features as fast.)

For gaming specifically though:

Win10 is gonna be my last Windows. 11 is invasive and opinionated, and 12 is gonna have a forced Ai fetish. Gross.

Good news: Steam games work wonderfully. Thanks to advances with Proton and all their support for the SteamDeck (which runs Linux btw!)

For other platforms, look into Heroic Launcher, which takes a lot of the headache out of managing stuff like GOG games. :)

With rolling releases you usually want to update cautiously and check news updates and stuff, because newer versions aren’t as thoroughly tested and some stuff might break…but you get new features faster so that’s fun.

That being said: If you’re willing to learn a little as you go, OpenSUSE Tumbleweed is a big win in my book for getting the latest fun stuff while still being stable! It’s also thoroughly security-minded.

And by default, it includes “Snapper” set up for you, so you can just roll the system back to a working version in the rare case something goes wrong. You can install snapper on any distro, but it comes pre-configured and ready to go, as long as you use the default “BTRFS” file system.

I won’t get into filesystems because hoo boi…but TL;DR: BTRFS allows “snapshots” and rollbacks that don’t require literally doubling your disk space for rolling back, so it’s a great safety net.

That being said: ALWAYS have more than one backup, in multiple locations, of anything you find important!

Good luck and have fun. I will say, Endeavour, OpenSUSE, and Pop_OS all have great communities that are eager to help if you’re eager to learn! :)

mayotte2048,

Steam on linux has tons of games. But not all of them (Baulder’s Gate 3.)

Forbo,
@Forbo@lemmy.ml avatar

BG3 running fine on my Ubuntu box.

CosmicCleric,
@CosmicCleric@lemmy.world avatar

Steam on linux has tons of games. But not all of them (Baulder’s Gate 3.)

I play Baldur’s Gate 3 on my Fedora KDE Linux system just fine.

captain_aggravated,
@captain_aggravated@sh.itjust.works avatar

Debian-based systems (including Ubuntu and its forks such as Mint) uses dpkg and APT (APT does all the communicating with repositories, dependency managment etc, dpkg actually installs and removes packages.) Aptitude is a TUI front-end for APT that gives you a menu-based system in the terminal. Synaptic (not to be confused with the trackpad driver) is a GUI front-end for APT.

I game on Linux Mint. Now it might be my tendency to play single player and/or cooperative multiplayer (think Stardew Valley or Unrailed!) games often made by smaller studios and indie developers as most of the AAA space has otherwise offended me, but…I don’t really have a problem. The vast majority of things just install and run from Steam.

uranibaba,

Started using Debian because I only used it for servers to begin with. Learned APT and never dared to learn anything else. So now I just stick with any distro using APT and a DE I like.

lolcatnip,

Apt, not Aptitude. Aptitude is just one of many front ends for Apt. I usually go for Synaptic.

Ghostbanjo1949,

Most new Linux users if not all, are unable to make an educated decision on package management. The UI that they think they will like better would be more important.

kplaceholder, in When Pokémon comes to Linux
@kplaceholder@lemmy.world avatar

I bought Cassette Beasts a few months ago but never got around to play it. I just want you to know that it was this post what made me finally play.

silverchase, (edited )
@silverchase@sh.itjust.works avatar

Cool! I hope you enjoy it. It’s such a heartful game and its battle mechanics add more depth to the formula.

ngn, in AMA
@ngn@lemy.lol avatar
  • how do i use cp
  • how do i kill all children of a parent
  • how do i remove orphans
0x4E4F, (edited )
@0x4E4F@sh.itjust.works avatar
  • The creepy pedo command can be used on any file, except PDF.

Regarding the rest, I think I have to call 911.

nandeEbisu, in AMA

How do you exit vim, and more importantly why would you even want to exit vim?

0x4E4F,
@0x4E4F@sh.itjust.works avatar

You click on the X button. You’re done doing whatever it is you people do in this so called “vim”, and you close it, simple.

0x4E4F, in AMA
@0x4E4F@sh.itjust.works avatar

No questions on how to exit vim 🤔 🤨?

Crashumbc,

I haven’t used vim since collage (I’m currently a aarp member) isn’t it “cntrl-x” ?

ReveredOxygen,
@ReveredOxygen@sh.itjust.works avatar

that is nano

Crashumbc,

Pretty sure nano didn’t exist in 93’ oh well

gentooer,

But pico did and nano is built to emulate pico.

loudWaterEnjoyer,
@loudWaterEnjoyer@lemmy.dbzer0.com avatar

Because the people are stuck in VIM

bhamlin, (edited )

From another terminal:

ps ax | grep vim | awk ‘{print $1}’ | xargs – kill -9

nogrub,

the only way to exit vim is to unplug your pc

0x4E4F,
@0x4E4F@sh.itjust.works avatar

Correct!

rxin,

How do I exit vmacs?? my coworker must have played s joke on me

0x4E4F,
@0x4E4F@sh.itjust.works avatar

You press the X button.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linuxmemes@lemmy.world
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10489856 bytes) in /var/www/kbin/kbin/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php on line 171

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10502144 bytes) in /var/www/kbin/kbin/vendor/symfony/error-handler/Resources/views/logs.html.php on line 36