Created
January 5, 2016 08:33
-
-
Save rstarmer/7e3a2b67037f5c963890 to your computer and use it in GitHub Desktop.
Additional tasks for enabling travisci's public key for remote ssh updates.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Get project from git | |
git: clone=yes dest=/var/www/ruby_hw repo=https://github.com/rstarmer/ruby_hw version=travisci | |
- name: Ensure .ssh director for web user | |
file: state=directory owner=web recurse=yes path=/home/web/.ssh mode=0700 | |
- name: Add ssh public key for travis-CI deployment | |
shell: cat /var/www/ruby_hw/travis.pub >> /home/web/.ssh/authorized_keys | |
- name: Ensure authroized_keys for web user | |
file: state=file owner=web path=/home/web/.ssh/authorized_keys mode=0600 | |
- name: change directory ownership | |
file: owner=web recurse=yes path=/var/www/ruby_hw | |
notify: | |
- reload apache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment