Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
las-it-organisation
32-0-IT instructions and rules
ansible
Commits
55b98a07
Commit
55b98a07
authored
Nov 10, 2017
by
julian.gethmann
Browse files
Make PyCharm role more idempotent
parent
9a2c331e
Changes
1
Hide whitespace changes
Inline
Side-by-side
roles/pycharm/tasks/main.yml
View file @
55b98a07
---
-
name
:
check if PyCharm is installed
stat
:
path
:
"
/usr/local/pycharm/{{
pycharm_name
|
regex_replace('-professional')
}}"
register
:
pycharm_installation
-
name
:
create temporary download directory
tempfile
:
state
:
directory
register
:
tmpdir
when
:
not (pycharm_installation.stat.isdir is defined and pycharm_installation.stat.isdir)
-
name
:
download PyCharm
get_url
:
url
:
"
https://download-cf.jetbrains.com/python/{{
pycharm_name
}}.tar.gz"
dest
:
/tmp/pycharm.tar.gz
dest
:
"
{{
tmpdir.path
}}/pycharm.tar.gz"
when
:
tmpdir.changed
-
name
:
c
reate directory
-
name
:
C
reate directory
become
:
yes
file
:
path
:
/usr/local/pycharm
state
:
directory
-
name
:
u
narchive
-
name
:
U
narchive
become
:
yes
unarchive
:
src
:
/tmp/pycharm.tar.gz
...
...
@@ -18,7 +30,7 @@
remote_src
:
yes
creates
:
"
/usr/local/pycharm/{{
pycharm_name
|
regex_replace('-professional')
}}"
-
name
:
l
ink PyCharm
-
name
:
L
ink PyCharm
become
:
yes
file
:
mode
:
o+rx
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment