gsoft-inc / ansible-role-azure-devops-agent

An Ansible role that installs and configures a Linux machine to be used as an Azure DevOps build or deployment agent.
59 stars 72 forks source link

Honor az_devops_agent_version after agent is installed #40

Closed imphil closed 3 years ago

imphil commented 3 years ago

Currently, az_devops_agent_version is only used when the agent is installed for the first time. Changing/updating this variable after the first installation does not result in an update of the agent (on Linux). This commit changes things so that the agent is updated if the installed version doesn't match the specified version.

Note that this change only applies to Linux (and is only tested there). I did have a quick look at the Darwin and Windows implementations, and they are sufficiently different to probably be not affected from this.

Also the documentation seems be already implying this new behavior, as it reads: "az_devops_agent_version: Version of the installed agent package. Should be periodically updated to the latest version". The last part of the sentence doesn't result in any action currently (but will after this change).

Fixes #34

yohanb commented 3 years ago

@imphil LGTM! Thanks