This repository has been archived by the owner. It is now read-only.
Permalink
Please sign in to comment.
Showing
with
213 additions
and 179 deletions.
- +0 −49 scripts/drupal.yml
- +31 −27 scripts/jenkinsbox.yml
- +64 −0 scripts/repository.yml
- +4 −0 scripts/roles/cibox-composer-drush/defaults/main.yml
- +16 −0 scripts/roles/cibox-composer-drush/tasks/main.yml
- +20 −9 scripts/roles/cibox-sniffers/defaults/main.yml
- +68 −0 scripts/roles/cibox-sniffers/tasks/install.yml
- +5 −93 scripts/roles/cibox-sniffers/tasks/main.yml
- +3 −0 scripts/tasks/download/drupal.yml
- +2 −1 scripts/tasks/project-variable.yml
@@ -0,0 +1,64 @@ | |||
--- | |||
- hosts: localhost | |||
connection: local | |||
gather_facts: no | |||
|
|||
vars: | |||
# As name of folder inside of "cmf/". | |||
cmf: drupal | |||
# As name of folder inside of "cmf/<NAME>/" | |||
version: 7 | |||
|
|||
vars_files: | |||
- ../config.yml | |||
|
|||
tasks: | |||
- include: tasks/project-variable.yml | |||
|
|||
- name: Check for CMF configuration | |||
stat: | |||
path: "../cmf/{{ cmf }}/{{ version }}/" | |||
register: cmf_configs | |||
|
|||
- name: CMF is not available | |||
fail: | |||
msg: 'You are not allowed to install the "{{ cmf }}" CMF because it is not pre-configured.' | |||
when: not cmf_configs.stat.exists | |||
|
|||
# @todo Fix to tasks/download-{{ cmf }}.yml in Ansible 2.0 | |||
- include: tasks/download/drupal.yml | |||
when: cmf == "drupal" | |||
|
|||
- name: Prepare CIBox-structured repository | |||
synchronize: | |||
src: "{{ item.src }}" | |||
dest: "../{{ project }}/{{ item.dest | default('') }}" | |||
archive: no | |||
recursive: yes | |||
with_items: | |||
- src: "{{ cmf_configs.stat.path }}/" | |||
- src: "../ansible.sh" | |||
- src: "../config.yml" | |||
- src: "../inventory" | |||
- src: "../vagrant/" | |||
|
|||
- src: "roles/" | |||
dest: "provisioning/ansible/roles/" | |||
|
|||
- name: Setting permissions for project tree | |||
file: | |||
mode: 0777 | |||
path: "../{{ project }}" | |||
state: directory | |||
recurse: yes | |||
|
|||
- name: Add Vagrant host to inventory file | |||
lineinfile: | |||
dest: "../{{ project }}/inventory" | |||
line: "\n[vagrant]\n{{ vm.network.private_network }} ansible_ssh_user={{ vm.ssh.username }} ansible_ssh_private_key_file=.vagrant/machines/default/virtualbox/private_key" | |||
|
|||
- name: Set name of the project to config.yml | |||
lineinfile: | |||
dest: "../{{ project }}/config.yml" | |||
line: "project: {{ project }}\nsite_url: http://{{ project }}.dev" | |||
insertafter: "^---$" |
@@ -0,0 +1,4 @@ | |||
--- | |||
cibox_composer_drush: | |||
version: 6.* | |||
user: root |
@@ -0,0 +1,16 @@ | |||
--- | |||
- name: Install Drush | |||
shell: "composer global require drush/drush:{{ cibox_composer_drush.version }} --no-interaction --no-ansi" | |||
sudo_user: "{{ cibox_composer_drush.user }}" | |||
|
|||
- name: Create symlinks | |||
file: | |||
src: "{{ item.src }}" | |||
dest: "{{ item.dest }}" | |||
force: yes | |||
state: link | |||
with_items: | |||
- src: "/home/{{ cibox_composer_drush.user }}/.composer/vendor/drush/drush/drush" | |||
dest: "/usr/local/bin/drush" | |||
- src: "/home/{{ cibox_composer_drush.user }}/.composer/vendor/bin/drush.complete.sh" | |||
dest: "/etc/bash_completion.d/drush" |
@@ -0,0 +1,68 @@ | |||
--- | |||
- name: Install APT repos | |||
apt_repository: | |||
repo: "{{ item }}" | |||
with_items: sniffers_apt_repos | |||
|
|||
- name: Update APT cache | |||
apt: | |||
update_cache: yes | |||
ignore_errors: yes | |||
|
|||
- name: Install APT packages | |||
apt: | |||
name: "{{ item }}" | |||
state: present | |||
with_items: sniffers_apt_packages | |||
|
|||
- name: Prepare directory for global Composer libs | |||
file: | |||
path: "{{ composer_dir }}" | |||
state: directory | |||
|
|||
- name: Install Composer global requires | |||
shell: "cd {{ composer_dir }} && composer require --prefer-dist {{ item }}" | |||
with_items: composer_global_require | |||
|
|||
- name: Clone Git repos | |||
git: | |||
repo: "{{ item.repo }}" | |||
dest: "{{ composer_dir }}/vendor/podarok/{{ item.name }}" | |||
version: "{{ item.branch }}" | |||
with_items: git_repos | |||
|
|||
- name: Install PHP CodeSniffer standards | |||
file: | |||
src: "{{ composer_dir }}/{{ item }}" | |||
dest: "{{ composer_dir }}/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/{{ item | basename }}" | |||
state: link | |||
with_items: phpcs_standards | |||
|
|||
- name: Fix permissions for composer libs | |||
file: | |||
path: "{{ composer_dir }}" | |||
mode: 0655 | |||
state: directory | |||
recurse: yes | |||
|
|||
- name: Create symlink to phpcs binary | |||
file: | |||
src: "{{ composer_dir }}/vendor/bin/phpcs" | |||
dest: /usr/bin/phpcs | |||
mode: 0655 | |||
state: link | |||
force: yes | |||
|
|||
- name: Install Node.js packages | |||
npm: | |||
name: "{{ item }}" | |||
global: yes | |||
with_items: npm_packages | |||
|
|||
- name: Update ruby alternatives for using ruby 1.9.1(3) version | |||
shell: "update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 --slave /usr/share/man/man1/ruby.1.gz ruby.1.gz /usr/share/man/man1/ruby1.9.1.1.gz --slave /usr/bin/ri ri /usr/bin/ri1.9.1 --slave /usr/bin/irb irb /usr/bin/irb1.9.1 --slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1" | |||
|
|||
- name: Install Gem packages | |||
shell: "gem install {{ item }}" | |||
with_items: gem_packages | |||
ignore_errors: yes |

Oops, something went wrong.
0 comments on commit
c18b024