Linux Integration
Install the Anyshift Linux agent on your hosts so Annie can ask them what is listening and which process owns it. The agent dials your Tower over TLS; you roll it out with the tools you already use.Quickstart
Install the agent on a host and enrol it with the Ansible role. The role installs the package, writes the configuration file (readable by root only) and starts the service.-e, on a command line, or in an SSM command parameter.
Prerequisites
- A Tower address (
host:port) and an enrollment token. - Ubuntu 22.04 or 24.04, Debian 13, Amazon Linux 2023 or Rocky 8, on x86_64 or aarch64, with systemd.
- The agent package for your version. Releases carry the
.deband.rpmpackages (v0.1.9 is the current one). The agent repository is private, so get the release assets from your Anyshift contact and host them on a mirror you control (S3, an artifact store); each method below takes the mirror’s address. Package repositories (apt and dnf) are the planned replacement for this step.
Roll out
- Ansible
- AWS SSM
- cloud-init
The role installs the package first, then writes Copy the package to the control host and add
/etc/anyshift/anyshift-linux-agent.conf (root:root, mode 0600), then starts the service once. A second run changes nothing.The agent repository is private. Get the role (the anyshift_linux_agent directory) from your Anyshift contact and copy it to roles/anyshift_linux_agent next to your playbook.anyshift_agent_package_local_path: /srv/anyshift/anyshift-linux-agent_{{ anyshift_agent_version }}_amd64.deb (_arm64.deb on aarch64 Debian and Ubuntu hosts; the .rpm with x86_64 or aarch64 in its name on RPM hosts), or point anyshift_agent_package_url at your mirror. Add anyshift_agent_package_sha256 (from SHA256SUMS) to have the role check a URL download.Use serial: 10 for a rolling rollout.systemctl is-active anyshift-linux-agent and journalctl -u anyshift-linux-agent -n 50.
Upgrade, roll back and remove
- Upgrade: run the same method with a new version. A running agent restarts once; a stopped agent stays stopped.
- Roll back: run it with the previous version (for example
VERSION=0.1.7). The configuration file is kept. By hand on Debian and Ubuntu,apt-get install -yrefuses to downgrade: add--allow-downgrades; on RPM hosts usednf downgradewith the older.rpm. The cloud-init example runs once at first boot, so use the Ansible role or the SSM document to roll back a running host. - Remove:
anyshift_agent_state=absentwith the role, orapt-get purge anyshift-linux-agent/dnf remove anyshift-linux-agent. The role keeps the configuration file unless you also setanyshift_agent_remove_config=true.
Where the token goes
Where the token goes
Put the Tower address and the token in the configuration file (
root:root, mode 0600) or in ANYSHIFT_AGENT_* environment variables of the service. Do not put them on a command line (visible to every local user), in an SSM command parameter (stored in the command history), or in a world-readable file.Python for Ansible
Python for Ansible
The role is tested with ansible-core 2.21. Ansible runs modules with the target’s Python, and ansible-core 2.21 supports target Python 3.9 to 3.14. Ubuntu 22.04 (3.10), Ubuntu 24.04 (3.12), Debian 13 (3.13) and Amazon Linux 2023 (3.9) work as they are. Rocky 8’s default Python 3.6 is too old: install
python3.11 and set ansible_python_interpreter=/usr/bin/python3.11 for those hosts. ansible-core 2.16 is end of life and cannot run on Debian 13.Packages are unsigned
Packages are unsigned
Until the package repositories are available, the packages are unsigned: the GPG check is off. The SSM document checks the package against
SHA256SUMS, the role does so only when you set anyshift_agent_package_sha256, and the cloud-init example checks nothing. Pin the sha256 in production.Hosts without systemd
Hosts without systemd
Set
anyshift_agent_manage_service: false. The role installs the package and writes the configuration file; run the agent under your own supervisor. On a host where systemd is running, the package itself still enables the unit; run systemctl disable anyshift-linux-agent if you do not want that.What is tested
What is tested
The Ansible role is exercised on all five distros (install, enrol, upgrade, roll back, remove) against a mock Tower. The SSM document and the cloud-init example are only syntax-checked: they have not been run against a real AWS account.