mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Remove some development code. EC2 -> SoftLayer
This commit is contained in:
parent
79f2dca60a
commit
5986959597
1 changed files with 3 additions and 4 deletions
|
@ -72,7 +72,7 @@ class SoftLayerInventory(object):
|
||||||
def parse_options(self):
|
def parse_options(self):
|
||||||
'''Parse all the arguments from the CLI'''
|
'''Parse all the arguments from the CLI'''
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Produce an Ansible Inventory file based on EC2')
|
parser = argparse.ArgumentParser(description='Produce an Ansible Inventory file based on SoftLayer')
|
||||||
parser.add_argument('--list', action='store_true', default=False,
|
parser.add_argument('--list', action='store_true', default=False,
|
||||||
help='List instances (default: False)')
|
help='List instances (default: False)')
|
||||||
parser.add_argument('--host', action='store',
|
parser.add_argument('--host', action='store',
|
||||||
|
@ -103,9 +103,8 @@ class SoftLayerInventory(object):
|
||||||
if 'hardwareStatusId' in instance and instance['hardwareStatusId'] != 5:
|
if 'hardwareStatusId' in instance and instance['hardwareStatusId'] != 5:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# if there's no IP address, we can't reach it
|
||||||
if 'primaryIpAddress' not in instance:
|
if 'primaryIpAddress' not in instance:
|
||||||
print instance['fullyQualifiedDomainName'] + " doesn't have an ip!"
|
|
||||||
print instance
|
|
||||||
return
|
return
|
||||||
|
|
||||||
dest = instance['primaryIpAddress']
|
dest = instance['primaryIpAddress']
|
||||||
|
@ -160,4 +159,4 @@ class SoftLayerInventory(object):
|
||||||
self.get_virtual_servers()
|
self.get_virtual_servers()
|
||||||
self.get_physical_servers()
|
self.get_physical_servers()
|
||||||
|
|
||||||
SoftLayerInventory()
|
SoftLayerInventory()
|
||||||
|
|
Loading…
Reference in a new issue