Commit cabbf25a authored by Swann Perarnau's avatar Swann Perarnau
Browse files

Merge branch 'options' into 'master'

Add usefull options to lease/appliance

See merge request !12
parents 550e4629 d4357578
......@@ -220,7 +220,11 @@ def do_configure(argv):
# call the remote ansible
remote_cmd = ('cd ansible;'
'ansible-playbook -i inventory.yaml ' + playpath)
'ansible-playbook -i inventory.yaml'
if argv.vault:
remote_cmd += ' --ask-vault-pass'
remote_cmd += ' ' + playpath
# forward agent, auto accept host, don't save it in the host file
cmd = ["ssh", "-A", "-oUserKnownHostsFile=/dev/null",
"-oStrictHostKeyChecking=no", "cc@" + public_ip, remote_cmd]
......@@ -263,6 +267,8 @@ def main():
parser_config = subparsers.add_parser("configure",
help="Configure an appliance")
parser_config.add_argument("--vault", action='store_true',
help="Ask for vault password on frontend play")
parser_config.add_argument("name", help="Name of the appliance")
parser_config.add_argument("playbook", default="main.yaml", nargs='?',
help="Playbook for remote configuration")
......@@ -48,6 +48,7 @@ def do_create(argv):
'resource_type': 'physical:host',
'hypervisor_properties': "",
'resource_properties': props,
'before_end': 'email' if else '',
resources = {k: v if isinstance(v, str) else json.dumps(v)
for k, v in resources.items()}
......@@ -116,6 +117,9 @@ def main():
help="Use haswell nodes instead of skylake",
help="Send email reminder before lease ends",
parser_create.add_argument("name", help="Lease name")
parser_create.add_argument("size", help="Number of hosts to lease",
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment