From 0973037ec089b20767b481dfcfe3b23aee8cecd0 Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Wed, 15 Feb 2023 16:58:43 +0100 Subject: [PATCH] Remove unused option for packer wrapper --- packer/README.md | 4 ++-- packer/packer | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/packer/README.md b/packer/README.md index 3b995bf91..da58e113b 100644 --- a/packer/README.md +++ b/packer/README.md @@ -8,8 +8,8 @@ This directory contains a python script named `packer` which wraps the system `p ### Running `packer` -To run the wrapper pass the environment, playbook, and any vars ansible is expecting: +To run the wrapper pass the environment and playbook: ```bash -$ ./packer staging docs-rs-builder --var "revision=SOME_REVISION5 +$ ./packer staging docs-rs-build ``` diff --git a/packer/packer b/packer/packer index d5a8ed127..d3a7deaf6 100755 --- a/packer/packer +++ b/packer/packer @@ -51,15 +51,10 @@ if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("env") parser.add_argument("playbook") - parser.add_argument('--var', action='append', help='Ansible variables as $key=$value', default=[]) args = parser.parse_args() workspace = create_workspace(args.env, args.playbook) - # Call packer with the right arguments from the workspace - vars = [] - for var in args.var: - vars += ["-var", var] - cmd = ["packer", "build", *vars, "template"] + cmd = ["packer", "build", "template"] res = subprocess.run(cmd, cwd=str(workspace)) if res.returncode != 0: exit(1)