summaryrefslogtreecommitdiff
path: root/ansible-practice/system/02-playbook-copy-bash-configs.yml
diff options
context:
space:
mode:
authorboom2 <blizzack@blizzack.com>2023-11-22 22:39:56 -0500
committerboom2 <blizzack@blizzack.com>2023-11-22 22:39:56 -0500
commitd00dff82886992cdad94ac70bc438ec5b2bda1a2 (patch)
treefc6e286816e8aaf48043b92fd81fc109569989f5 /ansible-practice/system/02-playbook-copy-bash-configs.yml
parent74b826b2e9783df019eea265772746cab691ce54 (diff)
more playbooks related to bash configs
Diffstat (limited to 'ansible-practice/system/02-playbook-copy-bash-configs.yml')
-rw-r--r--ansible-practice/system/02-playbook-copy-bash-configs.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/ansible-practice/system/02-playbook-copy-bash-configs.yml b/ansible-practice/system/02-playbook-copy-bash-configs.yml
new file mode 100644
index 0000000..ae4dd97
--- /dev/null
+++ b/ansible-practice/system/02-playbook-copy-bash-configs.yml
@@ -0,0 +1,24 @@
+# copy directories from control node to managed node
+# https://www.freekb.net/Article?id=759
+# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/copy_module.html
+#
+
+---
+- name: "02 - custom ansible - copy bash config files w/ content"
+# hosts: all
+ hosts: localhost
+ connection: local
+ tasks:
+ - name: copy '.bash_aliases'
+ ansible.builtin.copy:
+ src: ~/repos/ansible_repo/ansible-practice/system/.bash_aliases
+ dest: "~/tmp/temp_files/.bash_aliases"
+ mode: '0644'
+ tags: ['bash_aliases']
+
+ - name: Creating '.bashrc' file with content
+ copy:
+ src: ~/repos/ansible_repo/ansible-practice/system/.bashrc
+ dest: "~/tmp/temp_files/.bashrc"
+ mode: '0644'
+ tags: ['bashrc']