2016-11-07 14:00:57 +01:00
|
|
|
- name: is {{ home }}/.bash_profile present?
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.stat:
|
2016-11-07 14:00:57 +01:00
|
|
|
path: "{{ home }}/.bash_profile"
|
2017-03-24 14:15:09 +01:00
|
|
|
check_mode: no
|
2016-11-07 14:00:57 +01:00
|
|
|
register: bash_profile
|
2018-01-02 16:45:36 +01:00
|
|
|
tags:
|
|
|
|
- evomaintenance
|
2016-11-07 14:00:57 +01:00
|
|
|
|
|
|
|
- name: install shell trap in {{ home }}/.bash_profile
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.lineinfile:
|
2016-11-07 14:00:57 +01:00
|
|
|
dest: "{{ home }}/.bash_profile"
|
2016-12-19 14:19:35 +01:00
|
|
|
line: "trap \"sudo /usr/share/scripts/evomaintenance.sh\" 0"
|
2016-11-07 14:00:57 +01:00
|
|
|
insertafter: EOF
|
|
|
|
create: no
|
|
|
|
when: bash_profile.stat.exists
|
2018-01-02 16:45:36 +01:00
|
|
|
tags:
|
|
|
|
- evomaintenance
|
2016-11-07 14:00:57 +01:00
|
|
|
|
|
|
|
- name: is {{ home }}/.profile present?
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.stat:
|
2016-11-07 14:00:57 +01:00
|
|
|
path: "{{ home }}/.profile"
|
2017-03-24 14:15:09 +01:00
|
|
|
check_mode: no
|
2016-11-07 14:00:57 +01:00
|
|
|
register: profile
|
|
|
|
when: not bash_profile.stat.exists
|
2018-01-02 16:45:36 +01:00
|
|
|
tags:
|
|
|
|
- evomaintenance
|
2016-11-07 14:00:57 +01:00
|
|
|
|
|
|
|
- name: install shell trap in {{ home }}/.profile
|
2023-03-20 23:33:19 +01:00
|
|
|
ansible.builtin.lineinfile:
|
2016-11-07 14:00:57 +01:00
|
|
|
dest: "{{ home }}/.profile"
|
2016-12-19 14:19:35 +01:00
|
|
|
line: "trap \"sudo /usr/share/scripts/evomaintenance.sh\" 0"
|
2016-11-07 14:00:57 +01:00
|
|
|
insertafter: EOF
|
|
|
|
create: yes
|
|
|
|
when: not bash_profile.stat.exists
|
2018-01-02 16:45:36 +01:00
|
|
|
tags:
|
|
|
|
- evomaintenance
|