Skip to content

Commit

Permalink
chore(examples/config/cp_with_templates): Add example of TaskCp with …
Browse files Browse the repository at this point in the history
…templates
  • Loading branch information
ondrejsika committed Sep 2, 2023
1 parent e476be9 commit 0a51667
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/config/cp_with_templates/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
run:
gobble gobble
ssh root@gobble-test.sikademo.com cat /tmp/hello.txt
ssh root@gobble-test.sikademo.com cat /tmp/world.txt

20 changes: 20 additions & 0 deletions examples/config/cp_with_templates/gobblefile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
meta:
schema_version: 3
global:
no_strict_host_key_checking: true
hosts:
all:
- ssh_target: root@gobble-test.sikademo.com
vars:
filename: hello
- ssh_target: root@gobble-test.sikademo.com
vars:
filename: world
plays:
- name: Copy file to server
hosts: [all]
tasks:
- name: Replace 1
cp:
local_src: hello.txt
remote_dst: /tmp/{{.Vars.filename}}.txt
1 change: 1 addition & 0 deletions examples/config/cp_with_templates/hello.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Gobble Gobble...!

0 comments on commit 0a51667

Please # to comment.