@eu4ia/node-red-contrib-awx
Version:
Node to launch playbooks in awx
53 lines (49 loc) • 2.09 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('awx-config',{
category: 'config',
defaults: {
host: {value:"", required:true},
useTLS: { value: true, required: true },
rejectUnauthorized: {value: true, required: true}
},
credentials: {
token: {type:"password"}
},
label: function() {
return `${this.host}`;
}
});
</script>
<script type="text/html" data-template-name="awx-config">
<div class="form-row">
<label for="node-config-input-host"><i class="fa fa-globe"></i> AWX Host</label>
<input type="text" id="node-config-input-host">
</div>
<div class="form-row">
<label for="node-config-input-token"><i class="fa fa-key"></i> API Token</label>
<input type="password" id="node-config-input-token">
</div>
<div class="form-row">
<input type="checkbox" id="node-config-input-useTLS" style="display: inline-block; width: auto; vertical-align: top;">
<label for="node-config-input-useTLS" style="width: auto"> Use TLS</label>
</div>
<div class="form-row">
<input type="checkbox" id="node-config-input-rejectUnauthorized" style="display: inline-block; width: auto; vertical-align: top;">
<label for="node-config-input-rejectUnauthorized" style="width: auto"> Verify Certificates</label>
</div>
</script>
<script type="text/html" data-help-name="awx-config">
<p>To obtain an API token:</p>
<ol>
<li>Go to AWX interface</li>
<li>Navigate to Users</li>
<li>Search for your own user</li>
<li>Click your username to edit the user</li>
<li>Go to the TOKENS section</li>
<li>Click the Add button (+) to adda new token</li>
<li>Click the Add button (+) to adda new token</li>
<li>Leave the APPLICATION field blank, and select the "write" for the SCOPE</li>
<li>Click Save</li>
<li>A dialog will pop up with the new token. Save it somewhere secure</li>
</ol>
</script>