|
@@ -18,19 +18,24 @@
|
|
dest: "{{ anaconda_installer_file }}"
|
|
dest: "{{ anaconda_installer_file }}"
|
|
force: False
|
|
force: False
|
|
checksum: "md5:{{ anaconda_installer_md5 }}"
|
|
checksum: "md5:{{ anaconda_installer_md5 }}"
|
|
- register: installer_file
|
|
|
|
- - name: pre - write warning into Anaconda installer dir
|
|
|
|
|
|
+ - name: pre - link installer file to anaconda home
|
|
|
|
+ file:
|
|
|
|
+ src: "{{ anaconda_installer_file }}"
|
|
|
|
+ dest: "{{ anaconda_home_dir }}/installer.sh"
|
|
|
|
+ state: link
|
|
|
|
+ register: installer
|
|
|
|
+ - name: pre - write a note for installer
|
|
copy:
|
|
copy:
|
|
- dest: "{{ anaconda_installer_file }}.WARNING.txt"
|
|
|
|
|
|
+ dest: "{{ anaconda_home_dir }}/installer.README.txt"
|
|
content: |
|
|
content: |
|
|
- Do not touch the file because ansible
|
|
|
|
- may use it to decide if a reinstallation
|
|
|
|
|
|
+ Do not touch the linked file because ansible
|
|
|
|
+ uses it to decide if a reinstallation
|
|
(uninstall/install) is necessary.
|
|
(uninstall/install) is necessary.
|
|
- name: pre - remove installation for a new install
|
|
- name: pre - remove installation for a new install
|
|
# if the installer file changes, we assume a new version should be installed
|
|
# if the installer file changes, we assume a new version should be installed
|
|
# (the Anaconda way recommend a 'conda update' or similar instead of a new
|
|
# (the Anaconda way recommend a 'conda update' or similar instead of a new
|
|
# installation but we won't to that here to keep it simple stupid)
|
|
# installation but we won't to that here to keep it simple stupid)
|
|
- when: installer_file|changed
|
|
|
|
|
|
+ when: installer|changed
|
|
file:
|
|
file:
|
|
dest: "{{ anaconda_install_dir }}"
|
|
dest: "{{ anaconda_install_dir }}"
|
|
state: absent
|
|
state: absent
|
|
@@ -42,11 +47,11 @@
|
|
|
|
|
|
- name: install
|
|
- name: install
|
|
# =============
|
|
# =============
|
|
- when: "anaconda_state == 'present' and (installer_file|changed or anaconda_force_install)"
|
|
|
|
|
|
+ when: "anaconda_state == 'present' and (installer|changed or anaconda_force_install)"
|
|
|
|
|
|
block:
|
|
block:
|
|
- name: install - run installer
|
|
- name: install - run installer
|
|
- command: "bash {{ anaconda_installer_file }} -b -p {{ anaconda_install_dir }} {{ anaconda_force_install|ternary('-f', '') }}"
|
|
|
|
|
|
+ command: "bash {{ anaconda_home_dir }}/installer.sh -b -p {{ anaconda_install_dir }} {{ anaconda_force_install|ternary('-f', '') }}"
|
|
failed_when: false
|
|
failed_when: false
|
|
register: installer_out
|
|
register: installer_out
|
|
- name: install - fail if installer finished unsuccessfully
|
|
- name: install - fail if installer finished unsuccessfully
|