<?xml version='1.1' encoding='UTF-8'?>
<slave>
  <name><%= @agent_name %></name>
  <description><%= @description %></description>
  <remoteFS><%= @jenkins_home %></remoteFS>
  <numExecutors><%= @executors %></numExecutors>
  <mode><% if @exclusive %>EXCLUSIVE<% else %>NORMAL<% end %></mode>
  <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/>
  <launcher class="hudson.plugins.sshslaves.SSHLauncher" plugin="ssh-slaves@1.16">
    <host><%= @agent_hostname %></host>
    <port><%= @ssh_port %></port>
    <credentialsId><%= @credentials_id %></credentialsId>
    <maxNumRetries>0</maxNumRetries>
    <retryWaitTime>0</retryWaitTime>
    <sshHostKeyVerificationStrategy class="hudson.plugins.sshslaves.verifiers.KnownHostsFileKeyVerificationStrategy"/>
  </launcher>
  <label><%= @labels %></label>
  <nodeProperties/>
</slave>
<?xml version='1.1' encoding='UTF-8'?>
<slave>
  <name><%= @agent_name %></name>
  <description><%= @description %></description>
  <remoteFS><%= @jenkins_home %></remoteFS>
  <numExecutors><%= @executors %></numExecutors>
  <mode><% if @exclusive %>EXCLUSIVE<% else %>NORMAL<% end %></mode>
  <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/>
  <launcher class="hudson.plugins.sshslaves.SSHLauncher" plugin="ssh-slaves@1.16">
    <host><%= @agent_hostname %></host>
    <port><%= @ssh_port %></port>
    <credentialsId><%= @credentials_id %></credentialsId>
    <maxNumRetries>0</maxNumRetries>
    <retryWaitTime>0</retryWaitTime>
    <sshHostKeyVerificationStrategy class="hudson.plugins.sshslaves.verifiers.NonVerifyingKeyVerificationStrategy"/>
  </launcher>
  <label><%= @labels %></label>
  <nodeProperties/>
</slave>

Change verification strategy for ci-master nodes
Change verification strategy for ci-master nodes

Change the verification strategy for ci-master nodes from
"known hosts file verification strategy" to
"non verifying verification strategy".
This will prevent errors when jenkins tries to connect to one of
its nodes which ssh key has changed because it was reprovisioned.
Note that in general it's a bad idea to disable
'StrictHostKeyChecking' but in this case we were already trying to
bypass this check by deleting the known_hosts file. By disabling
the check we don't have to care about managing the known_hosts
file.
