2023-04-14 10:31:09 +00:00
|
|
|
- hosts: custom
|
|
|
|
gather_facts: no
|
|
|
|
vars:
|
|
|
|
ansible_connection: local
|
2023-08-03 06:09:13 +00:00
|
|
|
ansible_become: false
|
2023-04-14 10:31:09 +00:00
|
|
|
|
|
|
|
tasks:
|
2023-06-15 10:33:05 +00:00
|
|
|
- name: Test asset connection (paramiko)
|
2023-04-14 10:31:09 +00:00
|
|
|
ssh_ping:
|
|
|
|
login_user: "{{ jms_account.username }}"
|
|
|
|
login_password: "{{ jms_account.secret }}"
|
|
|
|
login_host: "{{ jms_asset.address }}"
|
|
|
|
login_port: "{{ jms_asset.port }}"
|
|
|
|
login_secret_type: "{{ jms_account.secret_type }}"
|
|
|
|
login_private_key_path: "{{ jms_account.private_key_path }}"
|
2023-08-03 06:09:13 +00:00
|
|
|
become: "{{ custom_become | default(False) }}"
|
|
|
|
become_method: "{{ custom_become_method | default('su') }}"
|
|
|
|
become_user: "{{ custom_become_user | default('') }}"
|
|
|
|
become_password: "{{ custom_become_password | default('') }}"
|
|
|
|
become_private_key_path: "{{ custom_become_private_key_path | default(None) }}"
|