mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Native YAML - cloud/cloudstack (#3613)
This commit is contained in:
parent
00eb0d27d9
commit
1a7b9090df
4 changed files with 49 additions and 25 deletions
|
@ -64,15 +64,24 @@ extends_documentation_fragment: cloudstack
|
|||
|
||||
EXAMPLES = '''
|
||||
# create a new private / public key pair:
|
||||
- local_action: cs_sshkeypair name=linus@example.com
|
||||
- cs_sshkeypair:
|
||||
name: linus@example.com
|
||||
delegate_to: localhost
|
||||
register: key
|
||||
- debug: msg='private key is {{ key.private_key }}'
|
||||
- debug:
|
||||
msg: 'Private key is {{ key.private_key }}'
|
||||
|
||||
# remove a public key by its name:
|
||||
- local_action: cs_sshkeypair name=linus@example.com state=absent
|
||||
- cs_sshkeypair:
|
||||
name: linus@example.com
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
|
||||
# register your existing local public key:
|
||||
- local_action: cs_sshkeypair name=linus@example.com public_key='{{ lookup('file', '~/.ssh/id_rsa.pub') }}'
|
||||
- cs_sshkeypair:
|
||||
name: linus@example.com
|
||||
public_key: '{{ lookup('file', '~/.ssh/id_rsa.pub') }}'
|
||||
delegate_to: localhost
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue