firmament-bash
Version:
Firmament module for interpreting commands in JSON files using bash
83 lines (82 loc) • 2.7 kB
JSON
{
"description" : "Build NginX web server from sources for Ubuntu 16.04 (LTS) (01)",
"prerequisiteGraphUri" : "prep-ubuntu-16.04-server-00.json",
"options" : {
"displayExecutionGraphDescription": true
},
"asynchronousCommands" : [
{
"description" : "[sudo] useradd nginx -s /bin/bash -m",
"suppressOutput" : false,
"suppressDiagnostics": true,
"showPreAndPostSpawnMessages": true,
"suppressFinalError" : true,
"outputColor" : "",
"useSudo" : true,
"command" : "/usr/bin/env",
"args" : [
"bash",
"-c",
"useradd -m -p `perl -e 'printf(\"%s\n\", crypt(\"password\",\"password\"))'` -s /bin/bash nginx"
]
},
{
"description" : "[sudo] Add [nopasswd] to nginx/sudoer's entry",
"suppressOutput" : false,
"suppressDiagnostics": true,
"showPreAndPostSpawnMessages": true,
"useSudo" : true,
"sudoPassword" : "password",
"command" : "/usr/bin/env",
"args" : [
"bash",
"-c",
"echo \"\nnginx ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers"
]
},
{
"description" : "[sudo] apt-get update",
"suppressOutput" : false,
"suppressDiagnostics": true,
"showPreAndPostSpawnMessages": true,
"useSudo" : true,
"command" : "apt-get",
"args" : [
"update"
]
}
],
"serialSynchronizedCommands": [
{
"description" : "[sudo] adduser nginx sudo",
"suppressOutput" : false,
"suppressDiagnostics": true,
"showPreAndPostSpawnMessages": true,
"outputColor" : "",
"useSudo" : false,
"command" : "bash",
"args" : [
"-c",
"sudo -- bash -c 'adduser nginx sudo'"
]
},
{
"description" : "apt-get install [...]",
"suppressOutput" : false,
"suppressDiagnostics": true,
"showPreAndPostSpawnMessages": true,
"useSudo" : true,
"command" : "apt-get",
"args" : [
"install",
"-y",
"openssl",
"libssl-dev",
"zlib1g",
"zlib1g-dev",
"libpcre3",
"libpcre3-dev"
]
}
]
}