From b396588392f8ef5ed4f8c89d32989a03fffc1e12 Mon Sep 17 00:00:00 2001 From: cfinlay Date: Tue, 10 Dec 2024 11:33:26 +0000 Subject: [PATCH 1/2] adding bash_profile role to user creation --- ansible/roles/win_user/tasks/bash_profile.yml | 16 ++++++++++++++++ ansible/roles/win_user/tasks/main.yml | 1 + 2 files changed, 17 insertions(+) create mode 100644 ansible/roles/win_user/tasks/bash_profile.yml 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 From 85135aabdae0db9354a1165fc1e06b70dba5a9f0 Mon Sep 17 00:00:00 2001 From: cfinlay Date: Wed, 11 Dec 2024 09:47:12 +0000 Subject: [PATCH 2/2] Revert "adding bash_profile role to user creation" This reverts commit b396588392f8ef5ed4f8c89d32989a03fffc1e12 --- ansible/roles/win_user/tasks/bash_profile.yml | 16 ---------------- ansible/roles/win_user/tasks/main.yml | 1 - 2 files changed, 17 deletions(-) delete mode 100644 ansible/roles/win_user/tasks/bash_profile.yml diff --git a/ansible/roles/win_user/tasks/bash_profile.yml b/ansible/roles/win_user/tasks/bash_profile.yml deleted file mode 100644 index f337da0..0000000 --- a/ansible/roles/win_user/tasks/bash_profile.yml +++ /dev/null @@ -1,16 +0,0 @@ -- 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 8b2ff65..da55724 100644 --- a/ansible/roles/win_user/tasks/main.yml +++ b/ansible/roles/win_user/tasks/main.yml @@ -1,4 +1,3 @@ --- - import_tasks: assert.yml - import_tasks: "{{ user_action }}.yml" -- import_tasks: bash_profile.yml