Skip to content

Instantly share code, notes, and snippets.

@TarasKindrat
Forked from altnight/playbook.yml
Created October 25, 2021 14:35
Show Gist options
  • Save TarasKindrat/17f1c1d5d5909e12dc815b9248b6a460 to your computer and use it in GitHub Desktop.
Save TarasKindrat/17f1c1d5d5909e12dc815b9248b6a460 to your computer and use it in GitHub Desktop.
ansible playbook for install python 3.4
---
- hosts: 127.0.0.1
connection: local
user: (user)
vars:
tmpdir: "/Users/(user)/tmpfile/python"
name: "Python"
version: "3.4.0"
tasks:
- name: "make dir"
local_action: command mkdir -p {{ tmpdir }}/{{ version }}
- name: "wget src"
local_action: get_url url=http://www.python.org/ftp/python/{{ version }}/Python-{{ version }}.tgz dest={{ tmpdir }}/{{ version }}
- name: "tar"
local_action: command tar xzvf Python-{{ version }}.tgz chdir={{ tmpdir }}/{{ version }}
- name: "configure"
local_action: command {{ tmpdir }}/{{ version }}/{{ name }}-{{ version }}/configure --prefix={{ tmpdir }}/{{ version }} chdir={{ tmpdir }}/{{ version }}
- name: "make"
local_action: command make chdir={{ tmpdir }}/{{ version }}
- name: "make install"
local_action: command make install chdir={{ tmpdir }}/{{ version }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment