diff options
| author | boom2 <blizzack@blizzack.com> | 2023-12-08 14:12:33 -0500 |
|---|---|---|
| committer | boom2 <blizzack@blizzack.com> | 2023-12-08 14:12:33 -0500 |
| commit | d8a7729358a2fd3b911022e45d0197fda3e5da94 (patch) | |
| tree | f75d69bcd7b08a9bebf325c037e4557c61a958e2 /ansible-practice/system/05-playbook-bash-configs.yml | |
| parent | 2fd6a845dfe9ed6b3189c247928dc87d8f76d01a (diff) | |
- add exeriments for:
- roles
- variables
- inventory changes
- config changes
Diffstat (limited to 'ansible-practice/system/05-playbook-bash-configs.yml')
| -rw-r--r-- | ansible-practice/system/05-playbook-bash-configs.yml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ansible-practice/system/05-playbook-bash-configs.yml b/ansible-practice/system/05-playbook-bash-configs.yml new file mode 100644 index 0000000..3f56745 --- /dev/null +++ b/ansible-practice/system/05-playbook-bash-configs.yml @@ -0,0 +1,31 @@ +# - similar to '02-playbook-copy-bash-configs.yml' but uses 'vars_files' +# to store the variable 'prefix_dir' inside files representing +# the environment + +--- +- name: "05 - custom ansible - copy bash config files w/ content" + hosts: localhost + connection: local + vars_files: + - [ "vars/{{ inventory_hostname }}.yml", "vars/otherhosts.yml" ] + tasks: + - name: copy '.bash_aliases' + ansible.builtin.copy: + src: ~/repos/ansible_repo/ansible-practice/system/.bash_aliases + dest: "{{ prefix_dir }}.bash_aliases" + mode: '0644' + tags: ['bash_aliases'] + + - name: Creating '.bashrc' file with content + ansible.builtin.copy: + src: ~/repos/ansible_repo/ansible-practice/system/.bashrc + dest: "{{ prefix_dir }}.bashrc" + mode: '0644' + tags: ['bashrc'] + + - name: Creating '.bash_profile' file with content + ansible.builtin.copy: + src: ~/repos/ansible_repo/ansible-practice/system/.bash_profile + dest: "{{ prefix_dir }}.bash_profile" + mode: '0644' + tags: ['bash_profile'] |
