Skip to content

Commit

Permalink
Merge pull request #2 from neingeist/master
Browse files Browse the repository at this point in the history
Install Dropbox on Fedora systems
  • Loading branch information
jdauphant committed Nov 7, 2015
2 parents 1f4bf5b + 0369a20 commit df7ff9f
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 13 deletions.
4 changes: 4 additions & 0 deletions files/dropbox.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Dropbox]
name=Dropbox Repository
baseurl=http://linux.dropbox.com/fedora/$releasever/
gpgkey=https://linux.dropbox.com/fedora/rpm-public-key.asc
4 changes: 4 additions & 0 deletions files/dropbox.repo.f22
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Dropbox]
name=Dropbox Repository
baseurl=http://linux.dropbox.com/fedora/22/
gpgkey=https://linux.dropbox.com/fedora/rpm-public-key.asc
11 changes: 3 additions & 8 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@ galaxy_info:
# versions:
# - all
# - any
#- name: Fedora
# versions:
# - all
# - 16
# - 17
# - 18
# - 19
# - 20
- name: Fedora
versions:
- all
#- name: opensuse
# versions:
# - all
Expand Down
13 changes: 13 additions & 0 deletions tasks/Fedora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Install Fedora dropbox package repo
copy: src=dropbox.repo
dest=/etc/yum.repos.d/dropbox.repo
when: ansible_distribution_version|int <= dropbox_fedora_max_releasever

- name: Install Fedora dropbox package repo (fallback)
copy: src=dropbox.repo.f{{dropbox_fedora_max_releasever}}
dest=/etc/yum.repos.d/dropbox.repo
when: ansible_distribution_version|int > dropbox_fedora_max_releasever

- name: Install Fedora dropbox package
dnf: name=nautilus-dropbox state=present
6 changes: 2 additions & 4 deletions tasks/Ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
- name: Download dropbox
- name: Download Ubuntu dropbox package
get_url: url={{ dropbox_url_ubuntu_deb }} dest={{dropbox_tmp_deb}}
tags: ["packages","dropbox"]

- name: Install dropbox for Debian OS family
- name: Install Ubuntu dropbox package
apt: deb={{dropbox_tmp_deb}}
tags: ["packages","dropbox"]
5 changes: 5 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
include: "Ubuntu.yml"
when: ansible_distribution == 'Ubuntu'
tags: ["packages","dropbox"]

- name: install dropbox for Fedora family
include: "Fedora.yml"
when: ansible_distribution == 'Fedora'
tags: ["packages","dropbox"]
3 changes: 2 additions & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
dropbox_architecture: "{% if ansible_architecture == 'x86_64' %}amd64{% else %}i386{% endif %}"
dropbox_url_ubuntu_deb: "https://www.dropbox.com/download?dl=packages/ubuntu/dropbox_{{dropbox_version}}_{{dropbox_architecture}}.deb"
dropbox_url_debian_deb: "https://www.dropbox.com/download?dl=packages/debian/dropbox_{{dropbox_version}}_{{dropbox_architecture}}.deb"
dropbox_url_rpm: "https://www.dropbox.com/download?dl=packages/fedora/nautilus-dropbox-{{dropbox_version}}-1.fedora.{{ansible_architecture}}.rpm"

dropbox_fedora_max_releasever: 22

0 comments on commit df7ff9f

Please sign in to comment.