Skip to content
Snippets Groups Projects
Commit afaed832 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Start ansible example to deplay a dolibarr instance on a linux server

parent 62e1c55c
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env ansible-playbook
- name: Configure webserver with apache
hosts: webservers
sudo: True
tasks:
- name: install apache
apt: name=apache update_cache=yes
- name: copy apache config file
copy: src=files/apachealias.conf dest=/etc/apache/conf.d/dolibarr_dev
#- name: enable configuration
# file: >
# dest=/etc/apache/sites-enabled/default
# src=/etc/apache/sites-available/default
# state=link
- name: copy info.html
template: src=templates/info.html.j2 dest=/var/www/dolibarr_dev/info.html
mode=0644
- name: restart apache
service: name=apache state=restarted
Alias /dolibarr_dev /var/www/dolibarr
[webservers]
testserver ansible_ssh_host=127.0.0.1 ansible_ssh_port=22
<html>
<head>
<title>Page info ansible</title>
</head>
<body>
<h1>Apache, configured by Ansible</h1>
<p>If you can see this, Ansible successfully installed apache.</p>
<p>{{ ansible_managed }}</p>
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment