Commit Graph

503 Commits (8b91265ffe1ae2ea5659f62ecc9173f381162961)

Author SHA1 Message Date
Dustin 3aad9c1dda roles/graylog: Add Graylog server deployment
The *graylog* role installs Graylog from the *graylog2.org* Yum
repository and manages basic server configuration.  It augments the
default systemd unit to provide the `CAP_NET_BIND_SERVICE` capability to
the Graylog server process via ambient capabilities, thereby allowing
the server to bind to the privileged Syslog UDP port.
2019-10-28 18:47:09 -05:00
Dustin 07eb3633e3 roles/mongodb: Add MongoDB deployment
The *mongodb* role installs MongoDB from the *mongodb.org* Yum
repository and manages basic server configuration.
2019-10-28 18:34:45 -05:00
Dustin dd4ccb3a32 roles/elasticsearch: Add Elasticsearch deployment
The *elasticsearch* role installs Elasticsearch from the Elastic.co Yum
repository and manages basic node configuration.
2019-10-28 18:33:37 -05:00
Dustin cf8180a195 bitwarden_rs: Fix path to BURP backup script 2019-09-27 14:07:29 -05:00
Dustin 0dc6a80ea2 taiga: Add playbook for Taiga
The `taiga.yml` playbook deploys all the necessary components to run
*taiga-back*, *taiga-front*, and *taiga-events*.
2019-09-19 19:51:45 -05:00
Dustin fab662bd53 hosts: hass0: Add untracked host_vars file 2019-09-19 19:50:35 -05:00
Dustin 02653f7e7c ansible.cfg: Disable stupid group name warning
For some reason, Ansible developers felt like it was important that
users name their host groups according to Python identifier naming
conventions.  This prevents, among other things, hyphens from being used
in group names.  Luckily, this ridiculous behavior is configurable.
2019-09-19 19:50:35 -05:00
Dustin c57de29054 roles/hass-dhcp: Enable DNS query logging 2019-09-19 19:50:35 -05:00
Dustin a1c90272b5 roles/freeradius: Set dhparam permissions
The `dhparam` file used by FreeRadius needs to be readable by the
*radiusd* group.
2019-09-19 19:50:35 -05:00
Dustin 2914bdb73c roles/certbot: Ensure certbot is configured first
The `Alias` configuration for Certbot needs to be configured before any
other locations, to ensure the `/.well-known` path is always served from
the local filesystem.  If another drop-in configuration file (e.g.
`bitwarden.conf`) is ordered before it, it may override this
configuration and prevent Let's Encrypt from working.
2019-09-19 19:50:35 -05:00
Dustin fb352cc920 jenkins-slave: Allow Jenkins to connect to Docker
In order to allow Jenkins to connect to the Docker daemon socket, the
socket must be owned by the *docker* group, and the *jenkins* user must
be a member of it.
2019-09-19 19:50:35 -05:00
Dustin b2cc467581 hosts: Add build0-amd64
*build0-amd64.securepassage.com* is a Jenkins agent that runs Docker,
allowing pipeline jobs to run inside containers.
2019-09-19 19:50:35 -05:00
Dustin 43deb1f89e hosts: Remove references to zabbix-server
Having an empty (therefore undefined) group as the child of another
group causes Ansible to emit a "warning" (really an error) indicating
that it cannot parse the inventory file:

    [WARNING]:  * Failed to parse
    /var/lib/jenkins/workspace/CfgMgmt/pyrocufflink/hosts with ini plugin:
    /var/lib/jenkins/workspace/CfgMgmt/pyrocufflink/hosts:60: Section
    [smtp- relay:children] includes undefined group: zabbix-server
2019-09-19 19:50:35 -05:00
Dustin e3e30eea1c hosts: dns0: Update DHCP server address
Now that the DHCP server has moved from *dns1* to *dns0*, the DNS server
needs to be updated to allow DDNS updates from the latter.
2019-09-19 19:27:30 -05:00
Dustin 1bb9c28ef4 pyrocufflink-dhcp: Add lease for serial0.p.b
*serial0.pyrocufflink.blue* has a manually-configured IP address now, to
ensure it always has an addresss, even if the DHCP server is
unavailable.  Recording it here to ensure the address does not
accidentally get reused.
2019-09-19 19:27:30 -05:00
Dustin c676aa2a0b roles/dch-proxy: Add haproxy config for Bitwarden
This commit adds an HAProxy backend for Bitwarden, and adds ACL rules to
the frontend to proxy traffic to *bitwarden.pyrocufflink.blue* or
*bitwarden.pyrocufflink.net* to it.
2019-09-19 19:27:30 -05:00
Dustin c68f9bb6af hosts: dc0.p.b: Renew Samba TLS certificate
Since the same certificate is used for LDAPS and RADIUS (EAP-TLS), it
makes more sense to store it only once, with the later file as a symlink
to the former.
2019-09-19 19:27:30 -05:00
Dustin 6e57abfe2e bitwarden_rs: Configure BURP client
This commit configures *bw0.pyrocufflink.blue* as a BURP client, so that
the Bitwarden data can be backed up.  A pre-backup script is used to
take a consistent snapshot of the SQLite database before copying it to
the BURP server.
2019-09-19 19:27:30 -05:00
Dustin e095f64126 burp-client: Apply the cronie role
Since the `burp` client command is scheduled to run using Cron, Cronie
needs to be installed and set up in order for the *burp-client* role to
install its cron table file.
2019-09-19 19:27:30 -05:00
Dustin e8ca37fa7c roles/burp-client: Set clientconfdir file owner
The BURP server runs as user *burp*, and nas such, requires that the
client-specific configuration files be owned by that user so they can be
read when a client connects.
2019-09-19 19:27:30 -05:00
Dustin 799d24f4b9 roles/burp-client: Update burp.conf for newer BURP
Newer versions of the BURP client require `status_port` to be set.  This
commit updates the `burp.conf.j2` template to more closely match the
default configuration shipped with the *burp* package, including setting
this new value.
2019-09-19 19:27:30 -05:00
Dustin e813008c86 roles/bitwarden_rs: Install sqlite
The `sqlite3` command is required to take consistent backups of the
Bitwarden_rs database.
2019-09-19 19:27:30 -05:00
Dustin 9306252e75 hosts: Add bw0.p.b
*bw0.pyrocufflink.blue* runs Bitwarden_rs via Docker.
2019-09-19 19:27:30 -05:00
Dustin 14cb924ba7 bitwarden_rs: Deploy Bitwarden_rs using Docker
The *bitwarden_rs* role sets up the Bitwarden_rs server using its
official Docker container.  It sets up Apache as a reverse proxy for TLS
support.
2019-09-19 19:27:29 -05:00
Dustin 1f535e980f roles/docker: Install and set up Docker daemon
The *docker* role configures the Docker daemon on the managed machine.
2019-09-19 19:27:12 -05:00
Dustin e7ad80d173 hosts: Remove Zabbix
At this point, it's unlikely that I will ever fix the Zabbix server.
Let's remove it from the inventory so the CI jobs will stop failing.
2019-08-23 08:51:04 -05:00
Dustin 26e887d0b0 Add new FireMon user network address 2019-08-23 08:48:22 -05:00
Dustin 8b0ead0570 hosts: dc0: Renew LDAP certificate 2019-05-08 11:07:27 -05:00
Dustin 9bce245f05 hosts: Remove cm0.p.b
*cm0.pyrocufflink.blue* has been deprecated and shut down.
Configuration Management jobs now run on regular Jenkins nodes, and are
serialized using "lockable resources" instead of a single executor.
2019-05-08 10:49:59 -05:00
Dustin 53f2a8e365 ci: Install findutils in build environment
The *findutils* package is needed for the `find` command, which is used
at the end of the CI pipelines to remove the `sudo-pass` vault files.
2019-05-02 16:27:58 -05:00
Dustin d6a5439057 hosts: Decommission dns1.p.b
*dns1.pyrocufflink.blue* has been decommissioned.  Having a second DNS
server never really worked correctly for some reason, and the
maintenance overhead of the Raspberry Pi is just not worth it right now.
The DHCP service has been moved to *dns0.pyrocufflink.blue*.
2019-05-02 10:29:43 -05:00
Dustin b7381b3fb1 ci: Use lockable resource to enforce serial runs
It is important that only one configuration management job run at a
time. Currently, this is enforced by having only one agent with the
*ansible* label, and that agent has only one executor. This is not an
ideal solution, because it requires maintaining a separate machine for
this purpose.

The *Lockable Resources Plugin* provides an alternate solution to this
problem. Using this plugin, jobs can acquire an exclusive lock on a
"resource" that prevents other jobs that require the same resource from
running. Any job that starts while the lock is held will wait until it
is released before executing. This will enforce the same serial
execution policy, but does not require a separate, dedicated machine.
Jobs will be able to run on any executor with the appropriate label.

Using this option, it is now possible to run configuration management
jobs on the normal agents, defining the execution environment in a
Docker image, so the *cm0.pyrocufflink.blue* agent can be
decommissioned.
2019-05-02 09:58:20 -05:00
Dustin f368938550 roles/gitea: Add Oauth2 JWT Secret
Newer versions of Gitea need a JWT secret for Oauth2.  Gitea will
attempt to generate one at startup if it is not already specified in the
configuration file, but this will fail since the file is not writable by
the user running the service.  As such, it must be set via configuration
policy.
2019-04-24 16:18:19 -05:00
Dustin 12b645e574 zabbix-server: Allow SMTP relay from any loopback
The Zabbix server resolves *localhost* to `::1`, but Postfix resolves it
to `127.0.0.1`.  This causes Postfix to reject incoming mail from Zabbix
with "Relay access denied."  Explicitly setting the `mynetworks` setting
to include both the IPv4 and IPv6 loopback addresses will ensure that no
mail is rejected from local processes, regardless of how name resolution
happens.
2019-04-15 10:05:04 -05:00
Dustin d8704fcb43 ssh-hostkeys: Add key for hass0.p.b 2019-03-22 16:53:43 -05:00
Dustin c8d6bae093 wheelhost: Publish wheels built by Jenkins
The point of the "wheel host" is to serve as a repository of Python
packages (wheels) built by Jenkins for consumption by `pip` et al. For
applications and libraries that do not provide all of their dependencies
as binary packages, this makes a convenient way to install them without
requiring all of the build tools and dependencies on the destination
machine.

The idea here is that a Jenkins job runs `pip wheel` for a distribution
package name or `requirements.txt` file and then uploads the resulting
wheel files using `rsync`. Apache is configured to serve the upload
directory with an index compatible with `pip`'s `--find-links`.
2019-03-22 10:19:27 -05:00
Dustin 2265dd235b roles/hass-dhcp: Deploy DHCP server for HA
The *hass-dhcp* role installs dnsmasq and configures it to serve DHCP
requests on the Home Assistant network. Since this network is not
routed, the regular DHCP relay/server setup will not work.
2019-03-22 09:43:30 -05:00
Dustin 51d6e13a13 websites: pyrocufflink.net: Disable rewrite log 2019-03-22 09:34:50 -05:00
Dustin cb92f47b4d roles/samba: Manage LDAP TLS certificates
This commit adds tasks to the *samba-dc* role to install TLS
certificates for the Samba LDAP server, and configures Samba to use
them.
2019-03-22 09:31:19 -05:00
Dustin b0690f942f roles/taiga: Fix HTTP->HTTPS redirect
The HTTP->HTTPS redirect must be defined in global scope in order for it
to work.
2019-03-22 09:29:56 -05:00
Dustin 7e585445b9 roles/vmhost: Enable KSM
This commit adds a systemd unit to enable the Kernel Same-page Merging
daemon on VM hosts. This allows much greater virtual machine density,
especially when many VMs are running the same guest OS.
2019-03-22 09:29:56 -05:00
Dustin 909c8e7a03 roles/haproxy: Add support for Debian hosts
Debian does not support system-wide SSL cipher suite profiles of course,
so these options need to be specified explicitly when deploying HAProxy
on Debian-based machines.
2019-03-22 09:29:56 -05:00
Dustin ceb56edf06 roles/net-ifaces: Create bridges for mgmt and hass
This commit updates the net-ifaces scripts for both *vmhost0* and
*vmhost1* to create VLAN and bridge interfaces for the Management and
Home Assistant networks.
2019-03-22 09:29:56 -05:00
Dustin 066bc807bd vm-hosts: Add mgmt and hass libvirt networks 2019-03-22 09:29:56 -05:00
Dustin 728657fdd5 pyrocufflink-dhcp: Add options to mgmt network
Specifying the DNS domain and UniFi address on the Management network
helps Ubiquiti devices more quickly locate the UniFi controller.
2019-03-22 09:29:56 -05:00
Dustin 691461cd8c roles/winbind: Fix error handling in ads_member
This commit fixes a couple of issues with the `ads_member` module
surrounding handling of errors from the `net ads join` command.
2019-03-22 09:29:56 -05:00
Dustin 159a42bb70 pyrocufflink-dns: Add FireMon zones 2019-03-22 09:29:56 -05:00
Dustin 417df821a3 pyrocufflink-dns: Remove pyrocufflink.jazz 2019-03-22 09:29:56 -05:00
Dustin a9d3b7894e roles/dhcpd: Support UniFi DHCP option 43
The `ubnt.unifi-address` DHCP option can be set to provide Ubiquiti
hardware with the hostname of the UniFi controller.
2019-03-22 09:29:56 -05:00
Dustin 5d47aad8a9 roles/zabbix: Add support for Debian
The *zabbix-agent* package for Debian locates configuration and log
files differently from other distributions.
2019-03-22 09:29:56 -05:00