Skip to content

Commit

Permalink
✏️ (profile-role): Better syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
theobori committed Apr 29, 2024
1 parent 50e4ce6 commit 4e70923
Showing 1 changed file with 8 additions and 25 deletions.
33 changes: 8 additions & 25 deletions roles/profile/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
# Taken from https://github.com/hashbang/shell-server/blob/797cec330b69fcc022581593aba42c0cd4641133/ansible/tasks/profile/main.yml#L97
- name: Remove default /etc/skel directory
block:
- name: Create /etc/skel/.profile
ansible.builtin.file:
path: /etc/skel/.profile
state: absent

- name: Create /etc/skel/.bash_logout
ansible.builtin.file:
path: /etc/skel/.bash_logout
state: absent

- name: Create /etc/skel/.bashrc
ansible.builtin.file:
path: /etc/skel/.bashrc
state: absent

- name: Create /etc/skel/.kshrc
ansible.builtin.file:
path: /etc/skel/.kshrc
state: absent

- name: Create /etc/skel/.mkshrc
ansible.builtin.file:
path: /etc/skel/.mkshrc
state: absent
ansible.builtin.file:
path: "/etc/skel/{{ item }}"
state: absent
loop:
- .bash_logout
- .bashrc
- .kshrc
- .mkshrc

- name: Override the useradd command configuration
ansible.builtin.replace:
Expand Down

0 comments on commit 4e70923

Please sign in to comment.