Skip to content

Commit d77f12a

Browse files
authored
Merge pull request ansible#5833 from Fale/fix_main_cloud_rackspace
Call main in conditional way - cloud/rackspace
2 parents 817b5f1 + 2696a70 commit d77f12a

20 files changed

+60
-20
lines changed

cloud/rackspace/rax.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,4 +890,6 @@ def main():
890890
from ansible.module_utils.rax import *
891891

892892
# invoke the module
893-
main()
893+
894+
if __name__ == '__main__':
895+
main()

cloud/rackspace/rax_cbs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,4 +233,6 @@ def main():
233233
from ansible.module_utils.rax import *
234234

235235
# invoke the module
236-
main()
236+
237+
if __name__ == '__main__':
238+
main()

cloud/rackspace/rax_cbs_attachments.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,6 @@ def main():
218218
from ansible.module_utils.rax import *
219219

220220
### invoke the module
221-
main()
221+
222+
if __name__ == '__main__':
223+
main()

cloud/rackspace/rax_cdb.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,4 +258,6 @@ def main():
258258
from ansible.module_utils.rax import *
259259

260260
# invoke the module
261-
main()
261+
262+
if __name__ == '__main__':
263+
main()

cloud/rackspace/rax_cdb_database.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,6 @@ def main():
172172
from ansible.module_utils.rax import *
173173

174174
# invoke the module
175-
main()
175+
176+
if __name__ == '__main__':
177+
main()

cloud/rackspace/rax_cdb_user.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,6 @@ def main():
217217
from ansible.module_utils.rax import *
218218

219219
# invoke the module
220-
main()
220+
221+
if __name__ == '__main__':
222+
main()

cloud/rackspace/rax_clb.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,6 @@ def main():
305305
from ansible.module_utils.rax import *
306306

307307
### invoke the module
308-
main()
308+
309+
if __name__ == '__main__':
310+
main()

cloud/rackspace/rax_clb_nodes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,4 +278,6 @@ def main():
278278
from ansible.module_utils.rax import *
279279

280280
# invoke the module
281-
main()
281+
282+
if __name__ == '__main__':
283+
main()

cloud/rackspace/rax_dns.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,6 @@ def main():
170170
from ansible.module_utils.rax import *
171171

172172
### invoke the module
173-
main()
173+
174+
if __name__ == '__main__':
175+
main()

cloud/rackspace/rax_dns_record.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,4 +345,6 @@ def main():
345345
from ansible.module_utils.rax import *
346346

347347
### invoke the module
348-
main()
348+
349+
if __name__ == '__main__':
350+
main()

0 commit comments

Comments
 (0)