From 698a44ffcfbf004fcbe30d5a69e302c56b83f818 Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Jan 19 2018 22:28:11 +0000 Subject: bin/get_roles.py: use copy to preserve the value of the appended roles list --- diff --git a/bin/get_roles.py b/bin/get_roles.py index 69f8ed3..b980fd9 100755 --- a/bin/get_roles.py +++ b/bin/get_roles.py @@ -2,6 +2,7 @@ # For description and usage, see the argparse options at the end of the file +from copy import copy import argparse import yaml import os @@ -32,7 +33,7 @@ def get_roles_of_one_server(server): def get_roles(append=[]): - roles = append + roles = copy(append) for sls in os.listdir('pillar/id'): _roles = get_roles_of_one_server(sls)