File tree 1 file changed +15
-6
lines changed
1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 25
25
- python-setuptools
26
26
- python-pip
27
27
- ruby
28
+ register : result
29
+ changed_when :
30
+ " '0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' not in result.stdout"
28
31
29
32
- name : Install base Python packages
30
- pip : name={{ item }}
31
- with_items :
32
- - virtualenv
33
+ pip : name=virtualenv
33
34
34
35
- name : Install python-lxml deps
35
36
# TODO: for some reason apt: pkg=python-lxml state=build-dep doesn't work
36
37
command : apt-get -y build-dep python-lxml
38
+ register : result
39
+ changed_when : " result.rc != 0"
37
40
38
41
- name : Install base Ruby packages
39
42
sudo : yes
64
67
name={{ database.user }}
65
68
priv=ALL
66
69
state=present
67
-
68
- - name : Restart postgresql
69
- service : name=postgresql state=restarted enabled=yes
70
+ notify : Restart PostgreSQL
70
71
71
72
- name : Ensure python/pythondotorg is cloned
72
73
sudo : no
94
95
command : " bundler install"
95
96
args :
96
97
chdir : " {{ project.path }}"
98
+ register : result
99
+ changed_when : " result.rc != 0 or result.stderr != ''"
97
100
98
101
- name : Install database migrations
99
102
sudo : no
100
103
django_manage : command=migrate
101
104
app_path={{ project.path }}
102
105
virtualenv={{ project.virtualenv }}
103
106
settings={{ django.settings }}
107
+ register : result
108
+ changed_when : " 'No migrations to apply.' not in result.out"
109
+
110
+ handlers :
111
+ - name : Restart PostgreSQL
112
+ service : name=postgresql state=restarted enabled=yes
You can’t perform that action at this time.
0 commit comments