HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
myplaceonline
posixcube
Shell2017–2017
myplaceonline / posixcube

posixcube

posixcube.sh is a POSIX compliant, shell script-based server automation framework.

3Distinct people
7Mentions
0Explicit recommenders
172GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

posixcube.sh is a POSIX compliant, shell script-based server automation framework.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week7 dated mentions

Observed mentions: 2017-01-12 00:33:29 UTC to 2017-06-10 14:10:14 UTC. Weeks start Monday, UTC.

0123452017-01-09 00:00:00 UTC to 2017-01-16 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 commentsJan 92017-01-16 00:00:00 UTC to 2017-01-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-23 00:00:00 UTC to 2017-01-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-30 00:00:00 UTC to 2017-02-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-02-06 00:00:00 UTC to 2017-02-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-02-13 00:00:00 UTC to 2017-02-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-02-20 00:00:00 UTC to 2017-02-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-02-27 00:00:00 UTC to 2017-03-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-03-06 00:00:00 UTC to 2017-03-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-03-13 00:00:00 UTC to 2017-03-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-03-20 00:00:00 UTC to 2017-03-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMar 202017-03-27 00:00:00 UTC to 2017-04-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-03 00:00:00 UTC to 2017-04-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-10 00:00:00 UTC to 2017-04-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-17 00:00:00 UTC to 2017-04-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-04-24 00:00:00 UTC to 2017-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-01 00:00:00 UTC to 2017-05-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-08 00:00:00 UTC to 2017-05-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-15 00:00:00 UTC to 2017-05-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-22 00:00:00 UTC to 2017-05-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-05-29 00:00:00 UTC to 2017-06-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-06-05 00:00:00 UTC to 2017-06-12 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsJun 5

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jan 92017-01-09 00:00:00 UTC2017-01-16 00:00:00 UTC514
Jan 162017-01-16 00:00:00 UTC2017-01-23 00:00:00 UTC000
Jan 232017-01-23 00:00:00 UTC2017-01-30 00:00:00 UTC000
Jan 302017-01-30 00:00:00 UTC2017-02-06 00:00:00 UTC000
Feb 62017-02-06 00:00:00 UTC2017-02-13 00:00:00 UTC000
Feb 132017-02-13 00:00:00 UTC2017-02-20 00:00:00 UTC000
Feb 202017-02-20 00:00:00 UTC2017-02-27 00:00:00 UTC000
Feb 272017-02-27 00:00:00 UTC2017-03-06 00:00:00 UTC000
Mar 62017-03-06 00:00:00 UTC2017-03-13 00:00:00 UTC000
Mar 132017-03-13 00:00:00 UTC2017-03-20 00:00:00 UTC000
Mar 202017-03-20 00:00:00 UTC2017-03-27 00:00:00 UTC000
Mar 272017-03-27 00:00:00 UTC2017-04-03 00:00:00 UTC000
Apr 32017-04-03 00:00:00 UTC2017-04-10 00:00:00 UTC000
Apr 102017-04-10 00:00:00 UTC2017-04-17 00:00:00 UTC000
Apr 172017-04-17 00:00:00 UTC2017-04-24 00:00:00 UTC000
Apr 242017-04-24 00:00:00 UTC2017-05-01 00:00:00 UTC000
May 12017-05-01 00:00:00 UTC2017-05-08 00:00:00 UTC000
May 82017-05-08 00:00:00 UTC2017-05-15 00:00:00 UTC000
May 152017-05-15 00:00:00 UTC2017-05-22 00:00:00 UTC000
May 222017-05-22 00:00:00 UTC2017-05-29 00:00:00 UTC000
May 292017-05-29 00:00:00 UTC2017-06-05 00:00:00 UTC000
Jun 52017-06-05 00:00:00 UTC2017-06-12 00:00:00 UTC202

What Hacker News says

7 sources
Right, I suppose for Ansible the idiomatic approach is to write/use a plugin - like: http://docs.ansible.com/ansible/firewalld_module.html Expanding the white-list of ips is a matter of config/templates. Fwiw, I do think Ansible tend to get a bit complicated because plugins tend to get a bit opaque and complicated. On the other hand, some simple special variables like "all_other_servers" to avoid manually filtering out "self" procedurally all the time is probably a good idea. I'm not sure if I'll be able to spare the time - but I'll at least watch the github repository - perhaps I can try and help flesh out some alternative examples if you file an issue? [ed: perhaps such things should go here? https://github.com/myplaceonline/posixcube/issues/4 ]
In Show HN: Posixcube, a shell script automation framework alternative to Ansible
Again, thanks for the objections, they're making me think hard about the design choices. > Lucky you if your SSH client never failed to connect. How do you think it reports a network failure? Currently posixcube handles this by checking the return code and reporting the error. > You see, there are tools that allow you to easily tell between network failure and remote command failure. RPC protocols are an example. ssh does have some basic differentiation: "ssh exits with the exit status of the remote command or with 255 if an error occurred." Although, of course, 255 might be returned by a remote command (not sure how likely that is), so it's still ambiguous. I guess you're saying that if it's an SSH error, then that's pretty safe to retry and it would be a nice feature, and I agree so I've opened this issue: https://github.com/myplaceonli
Read the rest
ne/posixcube/issues/6 > Now let's get practical: find me such a library. I guess it would just be a matter of, first, checking for 255, and next, checking the output of the command to see if it's an SSH error for sure? > We were talking about configuring servers. You basically tell me that I would have to pay for "agentlessness" with tracking state of each and every machine I would possibly want to reconfigure, and remembering to check if the machine was booted to re-issue a reconfiguration command. So you bring up a good point. On DigitalOcean, for example, their Fedora images use extlinux for booting and I can easily update the Linux command line (e.g. crashkernel), reboot, and it picks it up. Their Ubuntu distribution uses grub, and update-grub works fine, but for some reason, it requires a hard shutdown instead of a reboot to pick up the change. The way I handle this now is here: https://github.com/myplaceonline/myplaceonline_posixcubes/bl... We echo this instruction to the user. This prints a red-text error message and stops execution. This seems even better than an agent-based execution because with an agent-based architecture, the agent is now gone (hard powered off); whereas, this style of orchestration in the front-end can use a script on top of posixcube.sh that waits a minute, remotely calls DO to start the droplet, and then continues execution (using the same script since it's essentially idempotent). The only other option would be to have a centralized server that orchestrates all of this, which posixcube avoids. > Sorry, I'm lost here: what re-running? The command didn't get the chance to run in the first place. I don't know where did you get the idea that I propose running the command again if it got through to the remote server and failed there. See above, I'll need to try it, but I think the ssh error code for "command didn't get through" along with some simple heuristics on the command output /might/ work; I'll investigate in issue #6.
In Show HN: Posixcube, a shell script automation framework alternative to Ansible
Thanks, great idea. There's already optional Bash programmable tab auto-completion integration which auto-completes hosts from ~/.ssh/known_hosts (the auto-completion is installed using the `-b` option). I've created GitHub issues for integrating DO, Google Cloud, and AWS [1, 2, 3]. I'll start work with DO first since that's what I'm using now. [1] https://github.com/myplaceonline/posixcube/issues/1 [2] https://github.com/myplaceonline/posixcube/issues/2 [3] https://github.com/myplaceonline/posixcube/issues/3
In Show HN: Posixcube, a shell script automation framework alternative to Ansible
The impetus for this project was that I wanted to move away from Chef because it was costing me an extra administrative server per month. I wanted to try something new, so I didn't bother looking into chef-solo. I wanted something agent-less, and it seemed like Ansible was the latest alternative, but when I looked at its YAML, I felt fatigue at learning yet another domain specific language. I thought, "Hey, why not shell scripts?" (insert jwz RegEx joke here). I checked search engines and Stack Overflow, but I couldn't find much except for FSS which didn't meet my requirements, and I had always wanted to learn more about shell scripting, so I created my own framework called posixcube.sh (open source, MIT license): https://github.com/myplaceonline/posixcube. There were a few requirements that I had from my Chef cookbooks: * Idempotent fi
Read the rest
le templating with variable substitution * Plain-text and encrypted variable files * Logical packaging of recipes * Roles and a way to check for roles in scripts * Repeatable sets of actions for certain types of servers So beyond the basics in posixcube.sh of uploading itself to the remote host and providing a consistent API, the above requirements were solved with: cube_set_file_contents, gpg for encryption, "cubes" for logical packaging (although loose scripts and straight commands are also supported), -r ROLE, and cubespecs.ini, respectively. After having migrated an entire Ruby on Rails architecture (https://github.com/myplaceonline/myplaceonline_posixcubes) to posixcube, I thought it went very well, although I certainly see some of the downsides of shell scripting such as checking for error codes in a pipeline, strange HEREDOC interpolation, etc. I also see some of the benefits of complete idempotency, but I didn't find the additional procedural checks to emulate idempotency (outside of file templates) that difficult. For the simplest cube example from the previous link which configures an NFS server, see https://github.com/myplaceonline/myplaceonline_posixcubes/bl... and for a more complex nginx+Rails cube, see https://github.com/myplaceonline/myplaceonline_posixcubes/bl... You can test it as simply as: git clone https://github.com/myplaceonline/posixcube cd posixcube ./posixcube.sh -h $SERVER "cube_echo Hello World" For more complex examples, see the usage. I'm open to any feedback and any philosophical debate on this approach versus Ansible, Docker, etc.
In Show HN: Posixcube, a shell script automation framework alternative to Ansible

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.