diff --git a/hosts b/hosts index 305305f..c1b5a9b 100644 --- a/hosts +++ b/hosts @@ -10,7 +10,7 @@ homepageVM ansible_host=10.0.10.30 [dev] devVM ansible_host=10.0.30.105 ansible_user=ladmin bottom ansible_host=10.0.10.156 ansible_user=beast -debianDesktopVM ansible_host=10.0.10.206 ansible_user=user +debianDesktopVM ansible_host=10.0.10.206 ansible_user=user skip_reboot=true [ansible] ansible-controlVM ansible_host=localhost ansible_user=master diff --git a/roles/maintenance/tasks/main.yml b/roles/maintenance/tasks/main.yml index c853b41..737ef29 100644 --- a/roles/maintenance/tasks/main.yml +++ b/roles/maintenance/tasks/main.yml @@ -18,4 +18,6 @@ - name: Reboot if tasks changed things reboot: msg: "Reboot triggered by Ansible after system changes." - when: ansible_facts['pkg_mgr'] == "apt" + when: + - ansible_facts['pkg_mgr'] == "apt" + - skip_reboot is not defined or skip_reboot != true diff --git a/roles/user/tasks/main.yml b/roles/user/tasks/main.yml index 5d94331..43258ac 100644 --- a/roles/user/tasks/main.yml +++ b/roles/user/tasks/main.yml @@ -4,4 +4,3 @@ name: "{{ ansible_user }}" state: present shell: /bin/bash -