forked from theforeman/forklift
/
main.yml
28 lines (22 loc) · 855 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
- name: Check for specified files to copy to home directory
local_action:
module: stat
path: "{{ playbook_dir | dirname }}/user_devel_env_files/"
register: custom_home
- name: Copy files to home directory
copy:
src: "{{ playbook_dir | dirname }}/user_devel_env_files/"
dest: "{{ ansible_env.HOME }}"
when: custom_home.stat.isdir is defined and custom_home.stat.isdir
- name: Remove .gitkeep file copied over from custom directory
file:
path: "{{ ansible_env.HOME }}/.gitkeep/"
state: absent
- include_tasks: clone_specified_repo.yml
when: customize_home_git_repo is defined
- name: Check custom bootstrap script exists
stat:
path: "{{ ansible_env.HOME }}/{{ customize_home_bootstrap_script }}"
register: bootstrap_script_path
- include_tasks: boostrap_script.yml
when: bootstrap_script_path.stat.exists