Add unifi role

certbot_on_virtu
Alexandre Iooss 2019-06-23 10:47:45 +02:00
parent 440a1635fa
commit a626ae5484
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
3 changed files with 53 additions and 2 deletions

View File

@ -18,7 +18,17 @@
roles: roles:
- bind-recursive - bind-recursive
# Deploy firewall # Deploy firewall
- hosts: gulp.adm.crans.org - hosts: gulp.adm.crans.org
roles: [] # TODO roles: [] # TODO
# Deploy Unifi Controller
- hosts: unifi.adm.crans.org
vars:
# Indicate service in motd
motd_role:
name: unifi-controller
verbose_name: Le contrôleur Unifi
roles:
- unifi-controller
- motd-role

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# {{ ansible_managed }} # {{ ansible_managed }}
echo "✨ {{ motd_role.name|capitalize }} a été déployé sur cette machine." echo "✨ {% if motd_role.verbose_name is defined %}{{ motd_role.verbose_name }}{% else %}{{ motd_role.name|capitalize }}{% endif %} a été déployé sur cette machine."
{% if motd_role.path is defined %} {% if motd_role.path is defined %}
echo " Voir {{ motd_role.path }}" echo " Voir {{ motd_role.path }}"
{% endif %} {% endif %}

View File

@ -0,0 +1,41 @@
---
# Install HTTPS support for APT
- name: Install apt-transport-https
apt:
update_cache: true
name:
- apt-transport-https
- gpg
- dirmngr
state: present
register: apt_result
retries: 3
until: apt_result is succeeded
# Add the key
- name: Configure the apt key
apt_key:
keyserver: keyserver.ubuntu.com
id: 06E85760C0A52C50
state: present
register: apt_key_result
retries: 3
until: apt_key_result is succeeded
loop:
# Add the repository into source list
- name: Configure unifi repository
apt_repository:
repo: "{{ item }}"
state: present
loop:
- deb http://www.ui.com/downloads/unifi/debian stable ubiquiti
- name: Install unifi
apt:
update_cache: true
name: unifi
state: present
register: apt_result
retries: 3
until: apt_result is succeeded