Updated Ansible scripts, update cleanup script, update README
This commit is contained in:
parent
c2a6325849
commit
4a85989bd3
|
@ -2,6 +2,8 @@
|
|||
|
||||
This VirtualBox base image contains all the required packages and configuration for running/instantiating a Mastodon instance for development. It is build using [Hashicorp's Packer](https://packer.io), the provisioning is done with Ansible through a dedicated git submodule called [mastodon-ansible](https://github.com/moritzheiber/mastodon-ansible). The tests are using [ServerSpec](https://serverspec.org). The image is build continuously using [Hashicorp Atlas](https://atlas.hashicorp.com).
|
||||
|
||||
_Note: Some of the content of the scripts in `scripts/` is borrowed from the [Bento](https://github.com/chef/bento) project._
|
||||
|
||||
## Prerequisites (for building on your own)
|
||||
|
||||
- VirtualBox >= 5.1.x
|
||||
|
|
2
ansible
2
ansible
|
@ -1 +1 @@
|
|||
Subproject commit 378f7d3aab1a724e5e9b53046702fa50a9671694
|
||||
Subproject commit ce3f40045311ef20b74dc08915348de819012016
|
|
@ -22,7 +22,11 @@
|
|||
{
|
||||
"type": "ansible",
|
||||
"playbook_file": "ansible/playbook.yml",
|
||||
"extra_arguments": [ "--extra-vars", "\"mastodon_db_password=CHANGEME mastodon_db_login_unix_socket=/var/run/postgresql\"" ]
|
||||
"extra_arguments": [ "--extra-vars", "mastodon_db_password=CHANGEME" ],
|
||||
"ansible_env_vars": [
|
||||
"ANSIBLE_REMOTE_TEMP=\"~/.ansible-tmp\"",
|
||||
"ANSIBLE_SSH_PIPELINING=True"
|
||||
]
|
||||
},
|
||||
{ "type": "shell",
|
||||
"execute_command": "{{ .Vars }} sudo -E -S sh '{{ .Path }}'",
|
||||
|
|
|
@ -6,12 +6,12 @@ dpkg --list \
|
|||
| grep 'linux-headers' \
|
||||
| xargs apt-get -y purge;
|
||||
|
||||
# Remove specific Linux kernels, such as linux-image-3.11.0-15 but
|
||||
# Remove specific Linux kernels, such as linux-image-3.11.0-15-generic but
|
||||
# keeps the current kernel and does not touch the virtual packages,
|
||||
# e.g. 'linux-image-amd64', etc.
|
||||
# e.g. 'linux-image-generic', etc.
|
||||
dpkg --list \
|
||||
| awk '{ print $2 }' \
|
||||
| grep 'linux-image-[234].*' \
|
||||
| grep 'linux-image-.*-generic' \
|
||||
| grep -v `uname -r` \
|
||||
| xargs apt-get -y purge;
|
||||
|
||||
|
@ -21,6 +21,12 @@ dpkg --list \
|
|||
| grep linux-source \
|
||||
| xargs apt-get -y purge;
|
||||
|
||||
# delete docs packages
|
||||
dpkg --list \
|
||||
| awk '{ print $2 }' \
|
||||
| grep -- '-doc$' \
|
||||
| xargs apt-get -y purge;
|
||||
|
||||
# Delete X11 libraries
|
||||
apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6;
|
||||
|
||||
|
@ -28,10 +34,16 @@ apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6;
|
|||
apt-get -y purge ppp pppconfig pppoeconf;
|
||||
|
||||
# Delete oddities
|
||||
apt-get -y purge popularity-contest;
|
||||
apt-get -y purge popularity-contest installation-report command-not-found command-not-found-data friendly-recovery;
|
||||
|
||||
apt-get -y autoremove;
|
||||
apt-get -y clean;
|
||||
|
||||
# Remove docs
|
||||
rm -rf /usr/share/doc/*
|
||||
|
||||
# Remove caches
|
||||
find /var/cache -type f -exec rm -rf {} \;
|
||||
|
||||
# delete any logs that have built up during the install
|
||||
find /var/log/ -name *.log -exec rm -f {} \;
|
||||
|
|
Loading…
Reference in New Issue