Nesting conditionals on your deploys


Today we are releasing v0.075 and, among other things, ASYD now supports nesting conditionals.

In short, now you can do pretty much this:

if <%pkg_manager%> == apt
    # do some stuff on any apt-based system
    if <%dist%> == debian
    	# do some Debian stuff
    if <%dist%> == ubuntu
    	# do some Ubuntu stuff

You can do the same for configuration files:

<%if <%pkg_manager%> == apt %>
    # common configuration for apt-based systems
    <% if <%distr%> == debian %>
    	# some Debian configurations
    <% endif %>
    <% if <%dist%> == ubuntu %>
    	# some Ubuntu configurations
    <% endif %>
<% endif %>

Basically you can use this anywhere, making ASYD a really powerful configuration management system.

Check for admin privileges

As you must know, ASYD works using SSH in a non-interactive way.

Before this release, you had to add NOPASSWD parameter to your /etc/sudoers file to make sudo not require any password from the user.

But we wanted ASYD to be even more user-friendly (plug-and-play), so since this release now is ASYD itself who checks that the user has administrator privileges, and appends ” ALL=NOPASSWD:ALL” to this file if necessary.

If something fails on this process you’ll be notified and the host creation interrupted.

Deploy dry-run

Now, before actually executing a deploy, ASYD performs a dry-run of it to check if the syntax is correct and the deploy can run entirely without issues.

This only guarantees the deploy is correctly written, and not the actual function of the deploy itself.

MS Exchange emails

Thanks to Daniel Ripoll the notifications email system supports MS Exchange.

Now you can choose between it, SMTP or Sendmail.

SSH port variable

This release also introduces a quite useful new variable: <%SSH_PORT%>

As the name says, it returns the ssh port used by a host.

Here’s the full changelog

Leave a Reply

Your email address will not be published. Required fields are marked *