Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
236ec455cc | |||
69c38221ec | |||
63c544d9e9 | |||
c8015351b4 | |||
7048aa8418 |
19
README.md
19
README.md
@ -26,11 +26,28 @@ and services operated by Free I.T. Athens (FRITA).
|
|||||||
4. Run `ansible-playbook` against the production servers, e.g.,
|
4. Run `ansible-playbook` against the production servers, e.g.,
|
||||||
|
|
||||||
```
|
```
|
||||||
ansible-playbook -u root -i environments/production --vault-pass-file ./.ansible_vault webserver.yml --check
|
ansible-playbook -u root -i environments/production --vault-pass-file ./.ansible_vault webserver.yml --diff --check
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Delete the `.ansible_vault` file when you are done
|
5. Delete the `.ansible_vault` file when you are done
|
||||||
|
|
||||||
|
### Using Ansible Vault to add or rotate values
|
||||||
|
Do not submit ciphertext into Ansible Vault with the indention formatting.<br />
|
||||||
|
To submit, press `CTRL+d` twice.
|
||||||
|
|
||||||
|
- Decrypt Ansible Vault values
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible-vault decrypt --vault-pass-file .ansible_vault
|
||||||
|
```
|
||||||
|
|
||||||
|
- Encrypt new Ansible Vault values
|
||||||
|
|
||||||
|
```
|
||||||
|
ansible-vault encrypt --vault-pass-file .ansible_vault
|
||||||
|
```
|
||||||
|
- e.g., `pwgen -s 100 1 | ansible-vault encrypt --vault-pass-file .ansible_vault`
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
* **Kris Lamoureux** - *Project Founder* - [@krislamo](https://github.com/krislamo)
|
* **Kris Lamoureux** - *Project Founder* - [@krislamo](https://github.com/krislamo)
|
||||||
|
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
packages:
|
packages:
|
||||||
- dnsutils
|
- dnsutils
|
||||||
|
- ncdu
|
||||||
|
- tree
|
||||||
|
@ -24,6 +24,15 @@
|
|||||||
listen: composeup_webserver
|
listen: composeup_webserver
|
||||||
when: nextcloud_install.changed
|
when: nextcloud_install.changed
|
||||||
|
|
||||||
|
- name: Install Nextcloud background jobs cron
|
||||||
|
ansible.builtin.cron:
|
||||||
|
name: Nextcloud background job
|
||||||
|
minute: "*/5"
|
||||||
|
job: "/usr/bin/docker exec -u www-data webserver_nextcloud_1 /usr/local/bin/php -f /var/www/html/cron.php"
|
||||||
|
user: root
|
||||||
|
listen: composeup_webserver
|
||||||
|
when: nextcloud_install.changed
|
||||||
|
|
||||||
- name: Preform Nextcloud database maintenance
|
- name: Preform Nextcloud database maintenance
|
||||||
ansible.builtin.command: "docker exec --user www-data {{ webserver_root | basename }}_nextcloud_1 {{ item }}"
|
ansible.builtin.command: "docker exec --user www-data {{ webserver_root | basename }}_nextcloud_1 {{ item }}"
|
||||||
loop:
|
loop:
|
||||||
@ -32,4 +41,4 @@
|
|||||||
- "php occ db:convert-filecache-bigint"
|
- "php occ db:convert-filecache-bigint"
|
||||||
- "php occ maintenance:mode --off"
|
- "php occ maintenance:mode --off"
|
||||||
listen: composeup_webserver
|
listen: composeup_webserver
|
||||||
when: "' - needsDbUpgrade: true' in nextcloud_status.stdout_lines"
|
when: "' - needsDbUpgrade: true' in nextcloud_status.stdout_lines or nextcloud_install.changed"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
{% for key, value in webserver.items() %}
|
{% for key, value in webserver.items() %}
|
||||||
{{ key }}={{ value }}
|
{{ key }}={{ value }}
|
||||||
{% endfor %}
|
{% endfor %}
|
Loading…
Reference in New Issue
Block a user