Skip to content

Instantly share code, notes, and snippets.

@BrunoChauvet
Last active August 29, 2015 14:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrunoChauvet/23243d083ebdbf9da376 to your computer and use it in GitHub Desktop.
Save BrunoChauvet/23243d083ebdbf9da376 to your computer and use it in GitHub Desktop.
Ansible install Vtiger
- name: vTiger Installation
hosts: localhost
vars_files:
- ../var/settings.yml
tasks:
- name: General | Install Application packages
apt: "name={{ item }} state=present"
with_items:
- git
- curl
- name: vTiger | Create vTiger database
mysql_db:
login_user: root
login_password: "{{ mysql_root_password }}"
db: "{{ vtiger_db_name }}"
state: present
- name: vTiger | Create vTiger database user
mysql_user:
name: "{{ vtiger_db_user }}"
password: "{{ vtiger_db_password }}"
priv: "{{ vtiger_db_name }}.*:ALL,GRANT"
state: present
login_user: root
login_password: "{{ mysql_root_password }}"
- name: vTiger | Download application from Github
sudo: false
git: >
repo=https://github.com/maestrano/vtiger6.git
dest={{ vtiger_root_path }}
version=6.2.0-1
accept_hostkey=yes
ssh_opts="-o StrictHostKeyChecking=no"
update=yes
force=yes
- name: vTiger | Configure Apache virtual host
template:
src: ../templates/etc-apache22-confd-vtiger6-conf
dest: /etc/apache2/sites-available/vtigercrm.conf
owner: root
mode: 755
- name: vTiger | Enable Apache virtual host
file: src=/etc/apache2/sites-available/vtigercrm.conf dest=/etc/apache2/sites-enabled/vtigercrm.conf state=link
- name: Apache | Restart the Apache service
service:
name: apache2
state: restarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment