diff options
author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-06-08 10:57:35 -0400 |
---|---|---|
committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-06-08 10:57:35 -0400 |
commit | d30276dac07b3df32aa02711e27e94e90d925c89 (patch) | |
tree | 66074483c40a232a00c4cd3b87633d3431bd2ed6 /bin/cluster | |
parent | e03efb3d8570981ab818bf1b18c01e3573977ba3 (diff) | |
parent | 901f0ee491efb34f9788e11dd6d572928146da91 (diff) | |
download | openshift-d30276dac07b3df32aa02711e27e94e90d925c89.tar.gz openshift-d30276dac07b3df32aa02711e27e94e90d925c89.tar.bz2 openshift-d30276dac07b3df32aa02711e27e94e90d925c89.tar.xz openshift-d30276dac07b3df32aa02711e27e94e90d925c89.zip |
Merge pull request #186 from lhuard1A/os
Implement OpenStack provider for openshift-ansible
Diffstat (limited to 'bin/cluster')
-rwxr-xr-x | bin/cluster | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bin/cluster b/bin/cluster index bf8198de9..2ea389523 100755 --- a/bin/cluster +++ b/bin/cluster @@ -143,6 +143,8 @@ class Cluster(object): inventory = '-i inventory/aws/hosts' elif 'libvirt' == provider: inventory = '-i inventory/libvirt/hosts' + elif 'openstack' == provider: + inventory = '-i inventory/openstack/hosts' else: # this code should never be reached raise ValueError("invalid PROVIDER {}".format(provider)) @@ -163,6 +165,11 @@ class Cluster(object): if args.verbose > 0: verbose = '-{}'.format('v' * args.verbose) + if args.option: + for opt in args.option: + k, v = opt.split('=', 1) + env['opt_'+k] = v + ansible_env = '-e \'{}\''.format( ' '.join(['%s=%s' % (key, value) for (key, value) in env.items()]) ) @@ -189,13 +196,13 @@ if __name__ == '__main__': [DEFAULT] validate_cluster_ids = False cluster_ids = marketing,sales - providers = gce,aws,libvirt + providers = gce,aws,libvirt,openstack """ environment = ConfigParser.SafeConfigParser({ 'cluster_ids': 'marketing,sales', 'validate_cluster_ids': 'False', - 'providers': 'gce,aws,libvirt', + 'providers': 'gce,aws,libvirt,openstack', }) path = os.path.expanduser("~/.openshift-ansible") @@ -224,6 +231,8 @@ if __name__ == '__main__': meta_parser.add_argument('-t', '--deployment-type', choices=['origin', 'online', 'enterprise'], help='Deployment type. (default: origin)') + meta_parser.add_argument('-o', '--option', action='append', + help='options') action_parser = parser.add_subparsers(dest='action', title='actions', description='Choose from valid actions') |