CentOS 7
Sponsored Link

Func : Use CopyFileModule2016/09/29

 
This is the basic Usage for CopyFileModule.
[1] Copy '/root/test.txt' on Certmaster to /home on all Minions.
[root@dlp ~]#
func "*" copyfile -f /root/test.txt --remotepath /home/test.txt
# ls to verify

[root@dlp ~]#
func "*" call command run "ls -l /home" | sed 's/\\n/\n/g'
('node01.srv.world',
 [0,
  'total 4
drwx------. 2 cent cent 59 Aug  8  2015 cent
-rw-r--r--. 1 root root 10 Sep 30 16:46 test.txt
',
  ''])
('dlp.srv.world',
 [0,
  'total 4
drwx------. 2 cent cent 59 Aug  8  2015 cent
-rw-r--r--. 1 root root 10 Sep 30 16:46 test.txt
',
  ''])
Matched Content