This feature shall be optional and must be documented in the README to guide the user in using it successfully.
In the YAML, we should now add a variable that if configured signals that this feature is enabled, eg:
openwisp2fw_upload_api:
user: <username>
password: <password> # if this is supplied, it will be used to get the token and token is not required
token: <token> # if this is supplied, password is not required and the obtain authentication step will not be performed
url: URL of the openwisp instance
images:
# list of files that will be uploaded, becasue we don't want to upload
# all the images produced, since that is unnecessary in most cases
# if this list is empty, abort with a warning, but do not cause the failure of the playbook
- ar71xx-generic-xd3200-squashfs-sysupgrade.bin
- ramips-mt76x8-gl-mt300n-v2-squashfs-sysupgrade.bin
The following steps should be performed when a compilation has completed and only if this feature is enabled: