Created
January 21, 2021 21:26
-
-
Save don-rumata/9ad1d4d99fa3d1cfbea700f86a7a6e34 to your computer and use it in GitHub Desktop.
Revisions
-
don-rumata created this gist
Jan 21, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ --- # WORK - name: Ping hosts: all strategy: free serial: - "100%" tasks: - name: Ping 4 Windows when: ansible_os_family == 'Windows' become: yes become_method: runas # become_user: "{{ ansible_user }}" become_flags: logon_type=new_credentials logon_flags=netcredentials_only block: - win_ping: register: ping_win # - debug: # msg: "{{ ping_win }}" # - local_action: lineinfile line="{{ ansible_hostname }} {{ ping_win }}" path=/tmp/ping-ansible tags: - windows - ping - name: Ping 4 any linux when: - ansible_system == 'Linux' # Пашет!!! # - ansible_version.full == '2.9.6.sdfsdfs' ping: register: ping_linux