![]() |
5 months ago | |
---|---|---|
group_vars | 5 months ago | |
host_vars | 5 months ago | |
playbooks | 5 months ago | |
roles | 5 months ago | |
.gitignore | 5 months ago | |
Readme.md | 5 months ago | |
ansible.cfg | 5 months ago | |
hosts | 5 months ago |
Readme.md
Management of the app.foodcoops.net infrastructure
In this repository you'll find a couple of Ansible roles to setup and manage the infrastructure for the global hosting platform of foodcoops.net.
To use this roles you have to install these packages:
apt install ansible ansible-mitogen
We don't want to save internal data as clear text in this roles. For data encryption we make use of
ansible-vault. To complete your Ansible setup just create a file called .vault_pass
at the same level as this Readme file and include the vault password from our password database in this file. All variables that make use of the vault start with a prefix vault_
.
Have a look at a role's directory to find our more details on how we implement the global hosting platform.
You can execute a role by using the corresponding playbook which are named equally:
ansible-playbook playbooks/foodsoft.yml
Roles overview
Name | Description |
---|---|
basic-server | Initial setup for a new server |
nginx | Installation and configuration of Nginx |
mariadb | Installation and configuration of MariaDB |
postfix | Installation and configuration of Postfix for use with a real mail domain |
sharedlists | Installation, configuration, updating of sharedlists |
foodsoft | Installation, configuration, updating of the Foodsoft |
Common tasks
Adding a new foodcoop
- Gather all information
- Add the data to
host_vars/focone.yml
in the sectionfoodcoops
. Just follow the existing pattern. - Upload the changes to our Git repository.
- Execute the playbook with:
ansible-playbook playbooks/foodsoft.yml --tags never,foodcoop_add
- Immediately login with
admin
/secret
and change the user details and password. Theadmin
user should become the user account of the first contact person, so use their email address here. We do not want to encourage an unusedadmin
account. - You may want to pre-set some configuration if you know a bit more about the foodcoop. It's always helpful for new foodcoops to have a setup that already reflects their intended use a bit. At least you should set a time zone.
- Send an email to the foodcoop's contact persons with the url and admin account details.
- Please also communicate that this platform is run by volunteers from participating food cooperatives and depends on donations.
- Add the two contact persons to our foodsoft announce mailing list.
Deleting a foodcoop
If the deletion of a foocoop is requested follow these steps:
- Find the foodcoops's configuration at
host_vars/focone.yml
. Enter another entry calleddeleted: true
to the array:foodcoops: - name: mycoop database: foodsoft_mycoop deleted: true
- Execute the playbook:
ansible-playbook playbooks/foodsoft --tags never,foodcoops_delete
- Delete the foodcoop's entry from
host_vars/focone.yml
. - Upload the changes to our Git repository.
- Delete the two contact persons from our foodsoft announce mailing list.