clarify ansible connection plugin creation and link to working examples
This commit is contained in:
parent
4cfa49596a
commit
37cb3ec055
|
@ -214,9 +214,12 @@ class Connection(SSHConnection):
|
||||||
super(Connection, self).__init__(*args, **kwargs)
|
super(Connection, self).__init__(*args, **kwargs)
|
||||||
```
|
```
|
||||||
|
|
||||||
Newer versions of Ansible require all plugins to have a documentation string. You will need to copy
|
Newer versions of Ansible require all plugins to have a documentation string. You can see if there is a
|
||||||
the `options` from the `DOCUMENTATION` string from the [ssh.py Ansible connection plugin](https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/ssh.py)
|
plugin available for the version of Ansible you are using [here](https://github.com/hashicorp/packer/tree/master/examples/ansible/connection-plugin).
|
||||||
of the Ansible version you are using and add it to packer.py similar to as follows
|
|
||||||
|
To create the plugin yourself, you will need to copy all of the `options` from the `DOCUMENTATION` string
|
||||||
|
from the [ssh.py Ansible connection plugin](https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/ssh.py)
|
||||||
|
of the Ansible version you are using and add it to a packer.py file similar to as follows
|
||||||
|
|
||||||
``` python
|
``` python
|
||||||
from __future__ import (absolute_import, division, print_function)
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
@ -233,7 +236,7 @@ DOCUMENTATION = '''
|
||||||
author: Packer
|
author: Packer
|
||||||
version_added: na
|
version_added: na
|
||||||
options:
|
options:
|
||||||
**** Copy the options from
|
**** Copy ALL the options from
|
||||||
https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/ssh.py
|
https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/connection/ssh.py
|
||||||
for the version of Ansible you are using ****
|
for the version of Ansible you are using ****
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in New Issue