File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 97
97
notify :
98
98
- reload systemd
99
99
100
+ - name : Forcefully set mongodb_pymongo_from_pip to true on Debian 10
101
+ set_fact :
102
+ mongodb_pymongo_from_pip : false
103
+ when :
104
+ - ansible_distribution == 'Debian'
105
+ - ansible_distribution_release == 'buster'
106
+
100
107
- name : Install PyMongo package
101
108
apt :
102
109
name : " {{ 'python-pymongo' if ansible_facts['python'].version.major == 2 else 'python3-pymongo' }}"
110
+ when : not mongodb_pymongo_from_pip
111
+
112
+ - name : Install PIP
113
+ apt :
114
+ pkg :
115
+ - python-dev
116
+ - python-pip
117
+ when : mongodb_pymongo_from_pip | bool
118
+
119
+ # TODO: check if it is still needed for Debian/Ubuntu
120
+ - name : Install setuptools (required for ansible 2.7+)
121
+ apt :
122
+ pkg :
123
+ - python-setuptools
124
+ when : mongodb_pymongo_from_pip | bool
125
+
126
+ - name : Install PyMongo from PIP
127
+ pip :
128
+ name :
129
+ - pymongo
130
+ state : " {{ mongodb_pymongo_pip_version is defined | ternary('present', 'latest') }}"
131
+ version : " {{ mongodb_pymongo_pip_version | default(omit) }}"
132
+ when : mongodb_pymongo_from_pip | bool
You can’t perform that action at this time.
0 commit comments