ruby site

This commit is contained in:
Andreas Stephanides
2017-11-17 23:02:45 +01:00
parent 5c512f480b
commit c929c1974f
11 changed files with 107 additions and 4 deletions

6
ansible.cfg Normal file
View File

@@ -0,0 +1,6 @@
[defaults]
forks=2
[privilege_escalation]
ask_pass=True
[ssh_connection]
pipelining=True

View File

@@ -0,0 +1,9 @@
ruby_sites:
- name: "Seite 1"
become_user: "ruby"
git:
repo: "/mnt/intern"
dest: "/srv/intern/intern"
# repo: "https://github.com/kbroman/simple_site"

View File

@@ -0,0 +1,5 @@
---
- name: "deploying ruby sites"
include_tasks: site.yml
with_items: "{{ruby_sites}}"

View File

@@ -0,0 +1,26 @@
---
- debug:
msg: "Seite: {{item.name}}"
- command: whoami
register: whoami
changed_when: false
- debug: msg="{{ whoami.stdout }}"
- name: "DIR"
file:
path: "/srv/intern"
state: directory
owner: "ruby"
group: "ruby"
- name: Clone GIT
become_user: "ruby"
git:
repo: "{{item.git.repo}}"
dest: "{{item.git.dest}}"

View File

@@ -0,0 +1,28 @@
ruby_requirement_packages:
- curl
- gawk
- g++
- gcc
- make
- libc6-dev
- libreadline6-dev
- zlib1g-dev
- libssl-dev
- libyaml-dev
- libsqlite3-dev
- sqlite3
- autoconf
- libgmp-dev
- libgdbm-dev
- libncurses5-dev
- automake
- libtool
- bison
- pkg-config
- libffi-dev
- libmagickwand-dev
- imagemagick
- libmysqlclient-dev
- git

View File

@@ -0,0 +1,3 @@
- name: install requirements
apt: pkg="{{ item }}" cache_valid_time=3600 update_cache=yes state=present
with_items: "{{ ruby_requirement_packages }}"

View File

@@ -0,0 +1,13 @@
---
- command: whoami
register: whoami
changed_when: false
become_user: ruby
- debug: msg="{{ whoami.stdout }}"
- name: Stuff
include_tasks: stuff.yml

View File

@@ -0,0 +1,7 @@
---
- command: whoami
register: whoami
changed_when: false
become_user: ruby
- debug: msg="{{ whoami.stdout }}"

View File

@@ -1,5 +1,11 @@
- hosts: test_ruby - hosts: test_ruby
user: root become: true
become: False roles:
- testuser
- common
- rvm1-ansible
- ruby_sites
- hosts: test_common
sudo: True
roles: roles:
- common - common

View File

@@ -1 +1 @@
10.0.3.161 10.0.3.246