use strict;
-if (grep { $_ eq $ARGV[0] } qw(CA config new old pass client)) {
+if (defined $ARGV[0]
+ && grep { $_ eq $ARGV[0] } qw(CA config new old pass client)) {
exec "./Institute/inst", @ARGV;
}
#+END_SRC
#+CAPTION: [[file:abbey][=abbey=]]
#+BEGIN_SRC perl :tangle abbey
-if ($ARGV[0] eq "upgrade") {
+if (defined $ARGV[0] && $ARGV[0] eq "upgrade") {
shift;
my @args = ( "-e", "\@Secret/become.yml" );
if (defined $ARGV[0] && $ARGV[0] eq "-n") {
#+CAPTION: [[file:abbey][=abbey=]]
#+BEGIN_SRC perl :tangle abbey
-if ($ARGV[0] eq "reboots") {
+if (defined $ARGV[0] && $ARGV[0] eq "reboots") {
exec ("ansible-playbook", "-e", "\@Secret/become.yml",
"playbooks/reboots.yml");
}
#+CAPTION: [[file:abbey][=abbey=]]
#+BEGIN_SRC perl :tangle abbey
-if ($ARGV[0] eq "versions") {
+if (defined $ARGV[0] && $ARGV[0] eq "versions") {
exec ("ansible-playbook", "-e", "\@Secret/become.yml",
"playbooks/versarch.yml");
}
#+CAPTION: [[file:abbey][=abbey=]]
#+BEGIN_SRC perl :tangle abbey
-if ($ARGV[0] eq "facts") {
+if (defined $ARGV[0] && $ARGV[0] eq "facts") {
my $line = ("ansible all -m gather_facts -e \@Secret/become.yml"
. " >facts");
print "$line\n";
#+CAPTION: [[file:abbey][=abbey=]]
#+BEGIN_SRC perl :tangle abbey
-if ($ARGV[0] eq "tz") {
+if (defined $ARGV[0] && $ARGV[0] eq "tz") {
exec ("ansible-playbook", "-e", "\@Secret/become.yml",
"playbooks/timezone.yml");
}
use strict;
-if (grep { $_ eq $ARGV[0] } qw(CA config new old pass client)) {
+if (defined $ARGV[0]
+ && grep { $_ eq $ARGV[0] } qw(CA config new old pass client)) {
exec "./Institute/inst", @ARGV;
}
-if ($ARGV[0] eq "upgrade") {
+if (defined $ARGV[0] && $ARGV[0] eq "upgrade") {
shift;
my @args = ( "-e", "\@Secret/become.yml" );
if (defined $ARGV[0] && $ARGV[0] eq "-n") {
exec ("ansible-playbook", @args, "playbooks/upgrade.yml");
}
-if ($ARGV[0] eq "reboots") {
+if (defined $ARGV[0] && $ARGV[0] eq "reboots") {
exec ("ansible-playbook", "-e", "\@Secret/become.yml",
"playbooks/reboots.yml");
}
-if ($ARGV[0] eq "versions") {
+if (defined $ARGV[0] && $ARGV[0] eq "versions") {
exec ("ansible-playbook", "-e", "\@Secret/become.yml",
"playbooks/versarch.yml");
}
-if ($ARGV[0] eq "facts") {
+if (defined $ARGV[0] && $ARGV[0] eq "facts") {
my $line = ("ansible all -m gather_facts -e \@Secret/become.yml"
. " >facts");
print "$line\n";
exit;
}
-if ($ARGV[0] eq "tz") {
+if (defined $ARGV[0] && $ARGV[0] eq "tz") {
exec ("ansible-playbook", "-e", "\@Secret/become.yml",
"playbooks/timezone.yml");
}