SELinux by default prohibits certain things from working through VMware tools (Ansible connection or plain API).
This can be solved two ways:
Disabling SELinux: BAD, but easy
Writing a custom SELinux policy: complicated but more secure
Note: Adding/Changing this policy through a VMware tools connection is thankfully possible
Example policy
This policy is the base for a VMware tools policy and allows entering the rpm context (yum).
module custom-vmtools 1.0;
require {
type rpm_script_t;
type vmtools_unconfined_t;
class process transition;
}
#============= vmtools_unconfined_t ==============
allow vmtools_unconfined_t rpm_script_t:process transition
You can intercept normal name resolution in curl with the --resolve parameter allowing you to do things like talk to a specific site of a DNS load-balanced setup
or talk to a new deployment not yet made productive.
You can specify the resolve option multiple times so you can even catch redirects and move them to where you want as well.
It’s important to note that this intercept does only work on the ports you specify in the entries.
As I found out long after writing the above you can simply brew install coreutils and get a date command with the --date option.
The only thing to note there is this: Commands also provided by macOS have been installed with the prefix "g".
As part of my goal to write a book I began looking at how to build a following and where to sell the book once it’s finished.
On this journey I found Gumroad, a great place to sell digital products.
Given my idea to sell a comprehensive library of code snippets besides the actual book I took a look at existing integrations between it and GitLab.com,
my preferred git host.
Unfortunately I could not find any ready made solution, but given the great APIs from Gumroad and GitLab I set out to build one.
The result is GumLab, a easy way to sell access to GiLab projects through Gumroad.
For the love of Pete, please delete your old snapshots regularly!
Old snapshots have caused incidents and even outages more than once in my career
and it is really easy to preemptively look for them and get them removed before anything happens.
The year is coming to an end, with all its ups and downs 2020 surely was challenging to say the least.
I wanted to take this time to openly reflect on my first couple months of blogging and what the future holds for ps1.guru
Posts
| 2020-09-30
(updated 2025-10-23)
| 4 min read
#powershell
Series: Bash to PowerShell
Filtering data, from log or config files to data returned by an api,
is an important operation to remove noise from it and make further analysis possible.
Posts
| 2020-09-21
(updated 2025-10-26)
| 3 min read
#powershell
Series: Bash to PowerShell
Printing the last or first, few lines of a file is a common operation in day to day operations.
On Linux most people will, without thinking twice, use tail and it’s counterpart head to achieve this.
Posts
| 2020-09-20
(updated 2025-10-23)
| 1 min read
#powershell
Series: Bash to PowerShell
Whats the first thing coming to mind when seeing a command line?
For most people it is Linux, be it Ubuntu, Debian or RedHat.
And it is completely understandable. A big part of our industry has a background in Linux and sees it as the superior system for quick scripts and the like.