Skip to content
Snippets Groups Projects

Fix profile

Merged Pullyvan Krishnamoorthy requested to merge fixProfile into master
3 files
+ 146
66
Compare changes
  • Side-by-side
  • Inline
Files
3
tasks/centos.yml 0 → 100644
+ 72
0
---
# tasks file for anaconda
- name: install requirements for anaconda
become: yes
yum:
state: latest
pkg:
- libXcomposite
- libXcursor
- libXi
- libXtst
- libXrandr
- alsa-lib
- mesa-libEGL
- libXdamage
- mesa-libGL
- libXScrnSaver
- name: Check dl folder
become: yes
stat:
path: "{{ anaconda_dest }}"
register: dl_folder
- name: Create dl folder
become: yes
file:
path: "{{ anaconda_dest }}"
state: directory
mode: "0755"
when: dl_folder.stat.exists == False
- name: Check if anaconda is downloaded
become: yes
stat:
path: "{{ anaconda_dest }}/{{ anaconda_installer }}"
register: dl_anaconda
- name: Download anaconda installer
become: yes
get_url:
url: "https://repo.anaconda.com/archive/{{ anaconda_installer }}"
dest: "{{ anaconda_dest }}/{{ anaconda_installer }}"
mode: "0755"
when: dl_anaconda.stat.exists == False
- name: Check if anaconda is installed
become: yes
stat:
path: "{{ installed_path }}"
register: path_anaconda
- name: Run installer
become: yes
command: "bash {{ anaconda_dest }}/{{ anaconda_installer }} -b -p {{ installed_path }}"
when: path_anaconda.stat.exists == False
- name: Insert file in script for conda
blockinfile:
path: "{{ script_path }}"
create: yes
mode: '0755'
block: |
source /usr/local/anaconda3/bin/activate
conda init
- name: Export profile to get the username instead of bash-4.6
ansible.builtin.template:
src: bash_prompt.j2
dest: /etc/profile.d/bash_prompt.sh
\ No newline at end of file
Loading