Browse code

Use `state: latest` for `dpkg_selections` test.

We don't need to test with `upgrade: dist`, since we're not trying
to test the `apt` module. We just need to make sure the hold set
by the `dpkg_selections` module is working.

This change will avoid updating all the packages on the system,
which is slow, unnecessary, and can cause the installed python
to be changed.

(cherry picked from commit 136a2cca2fcea71d86ab317c476e9bb4b2dd34ac)

Matt Clay authored on 2018/11/15 09:51:40
Showing 1 changed files
... ...
@@ -19,7 +19,9 @@
19 19
 
20 20
 - name: attempt to upgrade hello
21 21
   apt:
22
-    upgrade: dist
22
+    name: hello
23
+    state: latest
24
+  ignore_errors: yes
23 25
 
24 26
 - name: check hello version
25 27
   shell: dpkg -s hello | grep Version | awk '{print $2}'
... ...
@@ -37,7 +39,8 @@
37 37
 
38 38
 - name: upgrade hello
39 39
   apt:
40
-    upgrade: dist
40
+    name: hello
41
+    state: latest
41 42
 
42 43
 - name: check hello version
43 44
   shell: dpkg -s hello | grep Version | awk '{print $2}'