Skip to content

Instantly share code, notes, and snippets.

@svpernova09
Created June 18, 2015 19:19
Show Gist options
  • Save svpernova09/3f085c684150896b1384 to your computer and use it in GitHub Desktop.
Save svpernova09/3f085c684150896b1384 to your computer and use it in GitHub Desktop.
Ansible task to copy file
- name: "Copy some file"
copy:
src=file-name.ext
dest=/tmp
owner=root
group=root
mode=0775
tags:
- tag
@mfrost503
Copy link

fatal: [127.0.0.1] => Failed to template \[\033[0;90m\]\T\[\033[0m\]$(git branch &>/dev/null;\
if [ $? -eq 0 ]; then \
  echo "$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; \
  if [ "$?" -eq "0" ]; then \
    # @4 - Clean repository - nothing to commit
    echo "\[\033[0;32m\]"$(__git_ps1 " (%s)"); \
  else \
    # @5 - Changes to working tree
    echo "\[\033[0;91m\]"$(__git_ps1 " {%s}"); \
  fi) \[\033[1;33m\]\w\[\033[0m\]\$ "; \
else \
  # @2 - Prompt when not in GIT repo
  echo " \[\033[0;33m\]\w\[\033[0m\]\$ "; \
fi): template error while templating string: Encountered unknown tag 's'.

FATAL: all hosts have already failed -- aborting

@mfrost503
Copy link

copy: src=iptables.rules dest=/home/matt/ owner=matt group=matt

Is what is in my tasks file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment