Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ansible
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
36
Issues
36
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
las-it-organisation
32-0-IT instructions and rules
ansible
Commits
25bb748e
Commit
25bb748e
authored
Nov 10, 2017
by
julian.gethmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make PyCharm role more idempotent
parent
96aa71e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
roles/pycharm/tasks/main.yml
roles/pycharm/tasks/main.yml
+16
-4
No files found.
roles/pycharm/tasks/main.yml
View file @
25bb748e
---
---
-
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
-
name
:
download PyCharm
get_url
:
get_url
:
url
:
"
https://download-cf.jetbrains.com/python/{{
pycharm_name
}}.tar.gz"
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
become
:
yes
file
:
file
:
path
:
/usr/local/pycharm
path
:
/usr/local/pycharm
state
:
directory
state
:
directory
-
name
:
u
narchive
-
name
:
U
narchive
become
:
yes
become
:
yes
unarchive
:
unarchive
:
src
:
/tmp/pycharm.tar.gz
src
:
/tmp/pycharm.tar.gz
...
@@ -18,7 +30,7 @@
...
@@ -18,7 +30,7 @@
remote_src
:
yes
remote_src
:
yes
creates
:
"
/usr/local/pycharm/{{
pycharm_name
|
regex_replace('-professional')
}}"
creates
:
"
/usr/local/pycharm/{{
pycharm_name
|
regex_replace('-professional')
}}"
-
name
:
l
ink PyCharm
-
name
:
L
ink PyCharm
become
:
yes
become
:
yes
file
:
file
:
mode
:
o+rx
mode
:
o+rx
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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