Skip to content

Commit

Permalink
Organize files
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Feb 27, 2024
1 parent c2be568 commit 8da7026
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
8 changes: 5 additions & 3 deletions roles/bash/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

- name: Copy .bash_profile to home folder
ansible.builtin.copy:
src: files/.bash_profile
src: files/bash/.bash_profile
dest: "{{ home_folder }}"
mode: preserve

Expand All @@ -19,21 +19,23 @@
changed_when: false

# yamllint disable rule:indentation
# yamllint disable rule:line-length
- name: Register .bashrc content
when: bashrc_exists.stat.exists is defined and bashrc_exists.stat.exists
ansible.builtin.shell: |
set -o pipefail
grep -qF "$(cat {{ lookup('file', 'files/.bashrc') }} | tr '\n' '\01')" \
grep -qF "$(cat {{ lookup('file', 'files/bash/.bashrc') }} | tr '\n' '\01')" \
<<< "$(cat {{ home_folder }}/.bashrc | tr '\n' '\01')"
register: bashrc_content_check
failed_when: false
changed_when: false
# yamllint enable rule:indentation
# yamllint enable rule:line-length

- name: Copy .bashrc to home folder
when: bashrc_exists.stat.exists is not defined or bashrc_content_check.rc is not defined or bashrc_content_check.rc != 0 # yamllint disable-line rule:line-length
ansible.builtin.copy:
src: files/.bashrc
src: files/bash/.bashrc
dest: "{{ home_folder }}"
mode: preserve

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion roles/ssh/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@

- name: Copy ssh config
ansible.builtin.copy:
src: files/config
src: files/ssh/config
dest: "{{ home_folder }}/.ssh/"
mode: preserve
File renamed without changes.

0 comments on commit 8da7026

Please sign in to comment.