Install yunohost
This commit is contained in:
parent
983738c987
commit
1578eb74ba
4 changed files with 109 additions and 1 deletions
53
README.md
53
README.md
|
@ -1,2 +1,53 @@
|
||||||
# ansible-yunohost
|
ansible-yunohost
|
||||||
|
=========
|
||||||
|
|
||||||
Deploy Yunohost with Ansible !
|
Deploy Yunohost with Ansible !
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
------------
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
Role Variables
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Example of Variables:
|
||||||
|
```yml
|
||||||
|
yunohost:
|
||||||
|
# Link to the install script
|
||||||
|
install_script_url: https://raw.githubusercontent.com/YunoHost/install_script/master/install_yunohost
|
||||||
|
# The main domain
|
||||||
|
domain: mydomain.fr
|
||||||
|
# Yunohost admin password
|
||||||
|
password: MYINSECUREPWD_PLZ_OVERRIDE_THIS
|
||||||
|
# If you don't want to use a noho.st url
|
||||||
|
ignore_dyndns: False
|
||||||
|
# The list of apps you want to install (not working yet).
|
||||||
|
apps: ~
|
||||||
|
```
|
||||||
|
|
||||||
|
Dependencies
|
||||||
|
------------
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
Example Playbook
|
||||||
|
----------------
|
||||||
|
```yml
|
||||||
|
- name: Provision servers
|
||||||
|
hosts: all
|
||||||
|
remote_user: root
|
||||||
|
pre_tasks:
|
||||||
|
- name: Update all packages and index
|
||||||
|
apt:
|
||||||
|
upgrade: dist
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- { role: ansible-yunohost }
|
||||||
|
```
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
|
||||||
|
GPL-3.0
|
||||||
|
|
11
default/main.yml
Normal file
11
default/main.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
yunohost:
|
||||||
|
# Link to the install script
|
||||||
|
install_script_url: https://raw.githubusercontent.com/YunoHost/install_script/master/install_yunohost
|
||||||
|
# The main domain
|
||||||
|
domain: mydomain.fr
|
||||||
|
# Yunohost admin password
|
||||||
|
password: MYINSECUREPWD_PLZ_OVERRIDE_THIS
|
||||||
|
# If you don't want to use a noho.st url
|
||||||
|
ignore_dyndns: False
|
||||||
|
# The list of apps you want to install (not working yet).
|
||||||
|
apps: ~
|
11
meta/main.yml
Normal file
11
meta/main.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
galaxy_info:
|
||||||
|
author: sylvainar
|
||||||
|
description: Deploy Yunohost with Ansible
|
||||||
|
|
||||||
|
license: GPL-v3
|
||||||
|
|
||||||
|
min_ansible_version: 1.2
|
||||||
|
|
||||||
|
galaxy_tags: [yunohost]
|
||||||
|
|
||||||
|
dependencies: []
|
35
tasks/main.yml
Normal file
35
tasks/main.yml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
---
|
||||||
|
- name: Install requirements
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- git
|
||||||
|
- dialog
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Test if Yunohost is already installed
|
||||||
|
stat: path=/etc/yunohost/installed
|
||||||
|
register: yunohost_file_install
|
||||||
|
|
||||||
|
- name: Download install script
|
||||||
|
get_url:
|
||||||
|
url: "{{ yunohost.install_script_url }}"
|
||||||
|
dest: /tmp/install_yunohost.sh
|
||||||
|
mode: 700
|
||||||
|
when: yunohost_file_install.stat.exists == False
|
||||||
|
|
||||||
|
- name: Launch script
|
||||||
|
command: /tmp/install_yunohost.sh -a
|
||||||
|
when: yunohost_file_install.stat.exists == False
|
||||||
|
|
||||||
|
- name: Launch postinsstall
|
||||||
|
shell: "
|
||||||
|
yunohost tools postinstall \
|
||||||
|
--domain {{ yunohost.domain }} \
|
||||||
|
--password {{ yunohost.password }} \
|
||||||
|
{% if yunohost.ignore_dyndns == True %} --ignore-dyndns {% endif %}
|
||||||
|
"
|
||||||
|
when: yunohost_file_install.stat.exists == False
|
||||||
|
|
||||||
|
- name: Install certificates
|
||||||
|
shell: "yunohost domain cert-install"
|
||||||
|
when: yunohost_file_install.stat.exists == False
|
Loading…
Reference in a new issue