-
-
Save TarasKindrat/17f1c1d5d5909e12dc815b9248b6a460 to your computer and use it in GitHub Desktop.
ansible playbook for install python 3.4
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: 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