diff --git a/ansible/roles/win_user/tasks/bash_profile.yml b/ansible/roles/win_user/tasks/bash_profile.yml new file mode 100644 index 0000000..f337da0 --- /dev/null +++ b/ansible/roles/win_user/tasks/bash_profile.yml @@ -0,0 +1,16 @@ +- name: Create the .bash_profile file with specified content + win_file: + path: "C:\\Users\\{{ item }}\\.bash_profile" + state: file + content: | + eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" + with_items: + - user1 # Replace with actual usernames + - user2 # Add more users as needed + +- name: Ensure the .bash_profile file is hidden + win_shell: | + attrib +h "C:\\Users\\{{ item }}\\.bash_profile" + with_items: + - user1 # Replace with actual usernames + - user2 # Add more users as needed diff --git a/ansible/roles/win_user/tasks/main.yml b/ansible/roles/win_user/tasks/main.yml index da55724..8b2ff65 100644 --- a/ansible/roles/win_user/tasks/main.yml +++ b/ansible/roles/win_user/tasks/main.yml @@ -1,3 +1,4 @@ --- - import_tasks: assert.yml - import_tasks: "{{ user_action }}.yml" +- import_tasks: bash_profile.yml