Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| # Problem: | |
| # | |
| # If you use git submodules linking two private github repos, you'll need to create a separate deploy key for each. | |
| # Multiple keys are not supported by Ansible, nor does ansible (when running git module) resort to your `.ssh/config` file. | |
| # This means your ansible playbook will hang in this case. | |
| # | |
| # You can however use the ansible git module to checkout your repo in multiple steps, like this: | |
| # | |
| - hosts: webserver | |
| vars: |
| deploy_user_name: 'deployer' | |
| # More info about password: http://docs.ansible.com/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module | |
| # password created with: python -c "from passlib.hash import sha512_crypt; print sha512_crypt.encrypt('example_password')" | |
| deploy_user_password: <encrypted_password> | |
| user_shell: "/bin/bash" | |
| deploy_user_home: "/home/{{ deploy_user_name }}" | |
| repo_api_token: <your_api_token> | |
| repo_project_id: <your_project_id> |
| upstream gitlab { | |
| server 172.17.42.1:10080 fail_timeout=0; | |
| } | |
| # let gitlab deal with the redirection | |
| server { | |
| listen 80; | |
| server_name git.example.com; | |
| server_tokens off; | |
| root /dev/null; |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| /* | |
| * Set up your Git configuration | |
| */ | |
| git config --global user.email "you@yourdomain.com" | |
| git config --global user.name "Your Name" | |
| git config --global core.editor "nano" |
| input { | |
| kafka { | |
| zk_connect => "localhost:2181" | |
| group_id => "logstash" | |
| topic_id => "metric" | |
| reset_beginning => false | |
| consumer_threads => 1 | |
| codec => "line" | |
| } | |
| } |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545