mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 11:10:21 -07:00
Merge pull request #4280 from angstwad/devel
Use set_setting in rax.py inventory module
This commit is contained in:
commit
05b3aaa39b
1 changed files with 4 additions and 2 deletions
|
@ -70,9 +70,9 @@ notes:
|
||||||
requirements: [ "pyrax" ]
|
requirements: [ "pyrax" ]
|
||||||
examples:
|
examples:
|
||||||
- description: List server instances
|
- description: List server instances
|
||||||
code: RAX_CREDS=~/.raxpub RAX_REGION=ORD rax.py --list
|
code: RAX_CREDS_FILE=~/.raxpub RAX_REGION=ORD rax.py --list
|
||||||
- description: List server instance properties
|
- description: List server instance properties
|
||||||
code: RAX_CREDS=~/.raxpub RAX_REGION=ORD rax.py --host <HOST_IP>
|
code: RAX_CREDS_FILE=~/.raxpub RAX_REGION=ORD rax.py --host <HOST_IP>
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
@ -112,6 +112,8 @@ except KeyError, e:
|
||||||
sys.stderr.write('Unable to load %s\n' % e.message)
|
sys.stderr.write('Unable to load %s\n' % e.message)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
pyrax.set_setting('identity_type', 'rackspace')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
pyrax.set_credential_file(os.path.expanduser(creds_file),
|
pyrax.set_credential_file(os.path.expanduser(creds_file),
|
||||||
region=region)
|
region=region)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue