Created
August 23, 2018 04:29
-
-
Save ashusaini/b2fc42f3c5b99b8e5c0b046d62a6ce5f to your computer and use it in GitHub Desktop.
This file is very helpful when you want to connect ansible to your server, i will enable ansible to perform other actions to server
This file contains 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 characters
- hosts: all | |
gather_facts: False | |
become: true | |
pre_tasks: | |
- name: Install python for Ansible | |
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) | |
changed_when: False | |
- setup: # aka gather_facts | |
tasks: | |
- name: install python 2 | |
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment