-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.yml
34 lines (28 loc) · 982 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
#4 tasks fil:se for kfieldho.cmake
- name: Check to See if CMake root exists
stat: path={{cmake_dest_dir}}
register: opt_kitware
- name: Ensure installation directory
sudo: True
file: state=directory mode=0755 dest={{cmake_dest_dir}}
when: opt_kitware.stat.exists == False
- name: Check to See if CMake is already installed
stat: path={{ cmake_install_dir }}/bin/cmake
register: bin_cmake
changed_when: bin_cmake.stat.exists == False
- name: Download CMake
get_url: url={{cmake_url}} dest={{cmake_temp}} validate_certs=False
register: cmake_downloaded
when: bin_cmake.stat.exists == False
- name: Install CMake
unarchive: copy=no src={{cmake_temp}} dest={{cmake_dest_dir}}
sudo: True
when: (bin_cmake.stat.exists == False) and (cmake_downloaded | success)
- name: Add CMake to the PATH
sudo: no
lineinfile:
dest: "{{ cmake_rcfile }}"
line: export PATH={{ cmake_install_dir }}/bin:$PATH
state: present
when: cmake_modify_path