cd

Running a Github Actions workflow on schedule and other events

One thing that was not obvious when I was setting up GitHub Actions on the Ansible Kubernetes Collection repository was how to have a 'CI' workflow run both on pull requests and on a schedule. I like to have scheduled runs for most of my projects, so I can see if something starts failing because an underlying dependency changes and breaks my tests.

The documentation for on.schedule just has an example with the workflow running on a schedule. For example:

on:
  schedule:
    # * is a special character in YAML so you have to quote this string
    - cron:  '*/15 * * * *'

Separately, there's documentation for triggering a workflow on events like a 'push' or a 'pull_request':

Automating Your Automation with Ansible Tower

The following is an excerpt from Chapter 11 of Ansible for DevOps, a book on Ansible by Jeff Geerling. The example highlights the effectiveness of Ansible Tower for automating infrastructure operations, especially in a team environment.

Throughout this book, all the examples use Ansible's CLI to run playbooks and report back the results. For smaller teams, especially when everyone on the team is well-versed in how to use Ansible, YAML syntax, and follows security best practices with playbooks and variables files, using the CLI can be a sustainable approach.

But for many organizations, there are needs that stretch basic CLI use too far:

"You have inserted a Blank DVD" – Opening discs from Windows on a Mac

A few times in my life, I've received DVD-Rs or CD-Rs that a Windows user burned and gave to me, and popped them in my Mac, only to receive a message, "You inserted a blank DVD [or CD]. Choose an action from the pop-up menu or click Ignore."

The problem is, there's no way to read the data from the disc on the Mac; you can try burning stuff onto it or simply ignoring it, but you can't read the pictures off the disk. I checked the data side of the disc, and, sure enough, there's a different color band where data was written. But it's a no-go on the Mac.

The problem here is that Microsoft/Windows decided to implement it's 'Drag to Disc' file copying feature in a somewhat annoying way; people with Windows computers can copy individual files to a burnable disc, eject the disc, and put it back in and copy more files to it. But they can't delete files from the disc, and this kinda breaks the way write-once media is supposed to work. (To Windows users: Make sure that you finalize/burn the disc completely before you hand it off to someone. Otherwise only Windows users can read the files).

Removing a Stuck Disc (CD/DVD) from a Mac - EVERY Way Possible

CDMost of the time, I'm extremely happy with Apple's decision to make all their physical media (CD/DVD) drives slot-loading, as it means there's one less part to accidentally break off my Mac, and it just looks so darn pretty! But every now and then, I have a hellish experience with the drive. This usually happens when:

  • A CD/DVD disc is warped or really thick (like most discs with homemade labels)
  • I'm given a mini CD (business card size) or DVD (this rarely happens anymore)
  • A CD/DVD is way out of balance... usually it's just slightly warped

That's the hardware side. Sometimes, I just want to get a dratted disc out of the computer, but dragging it to the trash, or pressing the 'Eject' key won't work. Often a dialog pops up and says "the disc is in use" (but it doesn't specify what application is using it!), or worse, there is no error—the disc just won't come out.

Here are the steps I usually take in trying to eject a CD or DVD—in order from least likely to damage the disc and/or my Mac, to most likely... always try the steps in order!