Skip to content
Permalink
Browse files

[debops-init] Automatically create .gitattributes

This file is used with git-crypt. It's commented out by default.
  • Loading branch information...
imrejonk committed Sep 4, 2019
1 parent 985149d commit 526b996b04954892b0447edb591ab6b898f1a999
Showing with 8 additions and 0 deletions.
  1. +8 −0 bin/debops-init
@@ -70,6 +70,11 @@ retry_files_enabled = False
;ssh_args = -o ControlMaster=auto -o ControlPersist=60s
"""

DEFAULT_GITATTRIBUTES = """# Uncomment the lines below to encrypt your secrets with git-crypt
#ansible/{SECRET_NAME}/** filter=git-crypt diff=git-crypt
#{SECRET_NAME}/** filter=git-crypt diff=git-crypt
"""

DEFAULT_GITIGNORE = r"""\
debops
ansible.cfg
@@ -162,6 +167,9 @@ def write_config_files(project_root):
# Create .debops.cfg
write_file(os.path.join(project_root, DEBOPS_CONFIG),
DEFAULT_DEBOPS_CONFIG)
# Create .gitattributes
write_file(os.path.join(project_root, '.gitattributes'),
DEFAULT_GITATTRIBUTES.format(SECRET_NAME=SECRET_NAME))
# Create .gitignore
write_file(os.path.join(project_root, '.gitignore'),
DEFAULT_GITIGNORE.format(SECRET_NAME=SECRET_NAME,

0 comments on commit 526b996

Please sign in to comment.
You can’t perform that action at this time.