main.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ---
  15. - name: Set Facts
  16. set_fact:
  17. ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
  18. - name: Disable host key checking
  19. replace:
  20. path: /etc/ssh/ssh_config
  21. regexp: '# StrictHostKeyChecking ask'
  22. replace: 'StrictHostKeyChecking no'
  23. - name: Install sshpass
  24. package:
  25. name: sshpass
  26. state: present
  27. - name: Verify and set passwordless ssh from manager to compute nodes
  28. block:
  29. - name: Execute on individual hosts
  30. include_tasks: passwordless_ssh.yml
  31. with_items: "{{ ssh_to }}"
  32. loop_control:
  33. pause: 5