Created
August 23, 2018 04:29
-
-
Save ashusaini/93ba2f257d36ccf81f09c75eb5980181 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