项目作者: Haelle

项目描述 :
Ansible scripts to deploy a cloud server (Plex, Nextcloud, RAID, backups etc...)
高级语言: Jinja
项目地址: git://github.com/Haelle/home_cloud_ansible.git
创建时间: 2019-05-20T12:54:17Z
项目社区:https://github.com/Haelle/home_cloud_ansible

开源协议:

下载


home_cloud_ansible

Ansible scripts to deploy a cloud server (Plex, Nextcloud, backups etc…)

It needs Ansible community tasks:

  1. ansible-galaxy collection install community.general
  2. ansible-galaxy collection install community.docker

Installation

  1. Enable SSH on the Raspberry
  2. Set the local IP of the Raspberry in inventory/hosts
  3. Create a new secrets files ansible-vault create <my-secrets.yml> with the following vars:
  • pi_password (use mkpasswd --method=sha-512 to generate the hash)
  • pi_ssh_key (remove it from media-server.yml if you don’t want an ssh-key)
  • nextcloud_admin_password
  • nextcloud_db_password
  • certbot_email

Reference this file in playbooks instead of ./secrets.yml

  1. Run some ansible commands
  1. ansible-galaxy install -r requirements.yml
  2. ansible-playbook rothomagus.yml

Other

See all ansible variables for a host

  1. ansible -u pi -m setup <hostname>

Nextcloud sync problems

Nextcloud sometimes fails to sync, I can be because of differences appearing between Nextcloud database and the file system.

It can be fixed with this command :

  1. sudo -u www-data php occ db:add-missing-indices
  2. sudo -u www-data php occ files:scan --all
  3. sudo -u www-data php occ files:cleanup

The second one is the most important, and tackle most of the problems

Plex claiming problems

It Plex is on another server (especially inside de container) you may not be able to claim the server.
Plex does not see the server as on the same network. Instead of trying to fix the network configuration let’s make a tunnel.

  1. ssh ip.address.of.server -L 8888:localhost:32400

And then go to http://localhost:8888/web, and claim it.

P.S: make sure all other SSH connection are close, if not ssh may use them as shared connection and not creating the tunnel.

Source

Check piplening is enabled

If in the log there is only ONE SSH: EXEC ssh.... it’s working if not there will be 3-5 occurences (https://stackoverflow.com/questions/43438519/check-if-ansible-pipelining-is-enabled-working) :

  1. ansible raspberry -vvv -u pi -m shell -a 'echo ok'

Firefox & KeepassXC

Actuellement KeepassXC n’arrive pas à communiquer avec Firefox natif (version snap).

Il faut donc :

  • désinstaller firefox de snap sudo snap remove firefox
  • ajouter le ppa de firefox sudo add-apt-repository ppa:mozillateam/ppa
  • rendre ce ppa prioritaire par rapport à snap
  • installer firefox
  1. # /etc/apt/preferences.d/mozilla-firefox
  2. Package: *
  3. Pin: release o=LP-PPA-mozillateam
  4. Pin-Priority: 1001

CopyQ & KeePassXC

CopyQ stock l’historique des c/p ; afin d’éviter qu’il stocke les mots de passe de KeePassXC il faut activer une commande

Fusuma

Check roles/desktop/tasks/fusuma.yml in order to make it work on startup

Elodie

Elodie repo

Put this in ~/.elodie/config.ini

  1. [MapQuest]
  2. key=8XwE7GPafsulqINcoWFbE4PcdFGZuuns
  3. prefer_english_names=False
  4. [Directory]
  5. location=%town %city, %state
  6. date=%Y-%m-%B
  7. full_path=%date/%album|%location