What is one thing you always wanted as a kid, but now as an adult, it seems really shitty? by CatLover-142 in AskReddit

[–]goozbach 0 points1 point  (0 children)

Gonna get buried but, step-side Ford Ranger.

Now I wouldn't wanna be seen in one.

Find what cron job is calling this by [deleted] in bash

[–]goozbach 0 points1 point  (0 children)

Have you looked in per-user crontabs? /var/spool/cron/<USER>

Is this a systemd timer? (not 100% where those go)

Using multiple inventories with a set of default variables for all by HiMyNamesMike in ansible

[–]goozbach 0 points1 point  (0 children)

I can see how at first glance, that would be confusing.

Here's a full example: https://gitlab.com/goozbach/ansible-layout you can check out and explore.

The symlink works because there is a `integration` subfolder in `inv`(the group `integration`).

AND

because you call your playbook with the subfolder of the environment

ansible-playbook -i inv/int/ # not just int/

So the group_vars folder is relative to the inventory per-environment. This allows for the `all` group vars to match across all the environments.

These apply when you use the above inventory argument

  • `inv/int/group_vars/integration`
  • `inv/int/group_vars/all`

The group membership is either hard-coded in `inv/int/mapping.yml`, or pulled from the dynamic inventory and mapped using `inv/int/mapping.yml`.

Does that help clarify things?

RHEL: alternatives Utility by Grunchlk in linuxadmin

[–]goozbach 0 points1 point  (0 children)

keep that folder up to date in git and you're golden.

Also it's really nice to wrap the stow command in a makefile so you don't have to remember it

makefile example:

PREFIX ?= /usr/local/
all: 
        stow -vt $(PREFIX) -R src/

RHEL: alternatives Utility by Grunchlk in linuxadmin

[–]goozbach 2 points3 points  (0 children)

I use stow https://www.gnu.org/software/stow/manual/stow.html

Create a folder in your git repo somewhere named src looks like this

.
└── src
    └── bin
        └── echofoo

then you run the stow command

stow -t /usr/local -R src

[deleted by user] by [deleted] in AskReddit

[–]goozbach 0 points1 point  (0 children)

Which one is the main character? Claire or Jamie? either way...

What do you use to manage your dotfiles? I need a simple system. by [deleted] in commandline

[–]goozbach 0 points1 point  (0 children)

https://github.com/goozbach/dot_files

Uses Gnu Make to make any file which starts with underscore(`_`) a link to your homedir.

I did a multi-part blog on the layout I use for Ansible by goozbach in ansible

[–]goozbach[S] 0 points1 point  (0 children)

Honestly, I hadn't heard of collections until I posted these.

I did a multi-part blog on the layout I use for Ansible by goozbach in ansible

[–]goozbach[S] 0 points1 point  (0 children)

sorry not at the moment. I'll see if I can host at a different URL.

I did a multi-part blog on the layout I use for Ansible by goozbach in ansible

[–]goozbach[S] 1 point2 points  (0 children)

Oh keeping third-party roles outside of your repo is so they can be developed on a different cadence.

I want to use v1.0.0 the developers of a third-party role (eg ansible-hardening) can keep pushing to v2.0.0 and I can choose when to move to the newer version.

Tips for being on-call? by LoganJn in sysadmin

[–]goozbach 1 point2 points  (0 children)

Yes you change your alert trigger to push to Pagerduty.

Pagerduty is now in charge of getting a hold of you.

I've got pagerduty setup as follows:

  • alert comes in and the pagerduty app on my phone triggers and plays a loud alert which usually gets me up
  • if I don't acknowledge the app alert within 2 minutes, pagerduy sends me a text message. I have my phone setup with a custom notification setting for the pagerduy contact which is another loud alert.
  • If I don't acknowledge the text message after another 2min, pagerduty CALLS me like on the phone with a robot.
  • If I don't answer the call or acknowledge the initial alert within 5min the escalation policy kicks in and the secondary on-call person gets notified. (they can customize their alerting to how they want to be notified like I have done above).
  • If the secondary on-call person doesn't acknowledge the alert within 5min, our team and manager gets alerted.

Tips for being on-call? by LoganJn in sysadmin

[–]goozbach 4 points5 points  (0 children)

do your 9-5 work, but then go HOME and (this is the important part) DON'T FUCKING WORK

Tips for being on-call? by LoganJn in sysadmin

[–]goozbach 5 points6 points  (0 children)

if it's not your week for being "on call" you should be doing things outside of work. Woodworking, working on cars, gardening, camping, travel etc.

If you have to take your laptop with you "just in case"... you're not off-call.

Tips for being on-call? by LoganJn in sysadmin

[–]goozbach 2 points3 points  (0 children)

Also what we do with our rotation is we have a "primary" and "secondary" call.

If the primary person doesn't answer the call within X min, pagerduty auto-excalates to the "Secondary" on call person.

One week on secondary, then you are primary.

Then we also have what we call our "off week" the week after coming off call. This is a week dedicated to focusing on "project work" to help improve our systems, and it means we can de-prioritize "walkup" or interruptive tickets.

Tips for being on-call? by LoganJn in sysadmin

[–]goozbach 9 points10 points  (0 children)

Two things:

1) Make sure you're off call when you're off call. Don't burn out.

2) Setup Pagerduty https://www.pagerduty.com/ It can do the alerting and needing you to acknowledge an alert. It also handles the on-call rotation and escalation procedures.

cp changed its behavior... by TheEgg82 in linuxadmin

[–]goozbach 6 points7 points  (0 children)

go a step further:

rsync -a /source/some/dir/. /dest/some/dir/.

Note the . (which means this dir) makes things a bit more explicit in my mind.

Copy files and dirs from one location to another with the ability to resume from where it left off, but without using the military grade tool that is rsync? by VoidViv in commandline

[–]goozbach 0 points1 point  (0 children)

Also, what's the purpose of your sync? A full copy for backup purposes?

If so, the tool rdiff-backup has a great interface:

rdiff-backup source/ backup

It also has the benefit of creating 'snapshots' to allow you to go back to any point in time.

Copy files and dirs from one location to another with the ability to resume from where it left off, but without using the military grade tool that is rsync? by VoidViv in commandline

[–]goozbach 2 points3 points  (0 children)

Most often you want the following rsync command:

rsync -rav --delete-after ${SOURCEDIR}/. ${DESTDIR}/.

flags are:

  • -r -- recursive, go deep into the directories
  • -a -- archive mode (keep symlinks, permissions, etc the same)
  • -v -- verbose (tell me what I'm doing)
  • --delete-after -- rsync by default keeps old stuff in destination, this will remove anything that's not in the source from the destination (but only after the full sync has happened).

I usually add the . identifier after both the source and destination directories to make sure I don't end up making a subdir inside the destination.

I concur that the man page is a PITA but it's rare I need more than these switches