diff --git a/ansible/roles/install/tasks/centos.yml b/ansible/roles/install/tasks/centos.yml index 4e23fcce5..cd1f0cacc 100644 --- a/ansible/roles/install/tasks/centos.yml +++ b/ansible/roles/install/tasks/centos.yml @@ -30,5 +30,5 @@ - name: Install package on CentOS/RedHat when: ansible_os_family == "RedHat" - yum: "pkg={{service}} update_cache=yes" + yum: "pkg={{service}} update_cache=yes state=latest" diff --git a/ansible/roles/install/tasks/debian.yml b/ansible/roles/install/tasks/debian.yml index bb7058038..cf8cf9657 100644 --- a/ansible/roles/install/tasks/debian.yml +++ b/ansible/roles/install/tasks/debian.yml @@ -18,5 +18,5 @@ - name: Install package on Debian/Ubuntu when: ansible_os_family == "Debian" - apt: "pkg={{service}}" + apt: "pkg={{service}} update_cache=yes state=latest" diff --git a/ansible/upgrade.yml b/ansible/upgrade.yml new file mode 100644 index 000000000..42ebad009 --- /dev/null +++ b/ansible/upgrade.yml @@ -0,0 +1,10 @@ +--- + +#variable "service" is required + +- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}" + roles: + - stop + - install + - start +