Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

write python code in ansible

- hosts: localhost
  gather_facts: no
  tasks:
  - name: test
    register: results
    args:
      stdin: |
        import sys
        print(sys.version)
    command: /usr/bin/python3
  - debug:
      var: results
Source by www.reddit.com #
 
PREVIOUS NEXT
Tagged: #write #python #code #ansible
ADD COMMENT
Topic
Name
4+5 =