Created
February 20, 2020 16:08
-
-
Save mikelfo/db3bf786bfcb1906dfa546ffc902ff88 to your computer and use it in GitHub Desktop.
Run Ansible on remote machines even when they don't have python installed yet.
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 characters
| # Import this before any roles on your playbooks: `- import_playbook: ansible-set-up-playbook.yml` | |
| --- | |
| - name: ansible_set_up | |
| hosts: all | |
| # This Playbook is run as root @see inventory-*.yml files for details about Privilege Escalation for this playbook | |
| become: yes | |
| # @see https://www.linuxschoolonline.com/how-to-use-ansible-even-it-the-target-host-does-not-have-python-installed/ | |
| gather_facts: no | |
| # debugger: always | |
| pre_tasks: | |
| - name: Install python3 using 'raw' module | |
| raw: 'apt-get -y install python3 python-minimal' | |
| tasks: [] | |
| roles: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment