aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ansible/group_vars/all/apt-repos.yml134
-rw-r--r--ansible/group_vars/workstation/apt-repos.yml138
-rw-r--r--ansible/roles/apt-repos/defaults/main.yml2
-rw-r--r--ansible/roles/apt-repos/tasks/main.yml2
4 files changed, 154 insertions, 122 deletions
diff --git a/ansible/group_vars/all/apt-repos.yml b/ansible/group_vars/all/apt-repos.yml
new file mode 100644
index 0000000..6d52c81
--- /dev/null
+++ b/ansible/group_vars/all/apt-repos.yml
@@ -0,0 +1,134 @@
+# Use "gpp foo.gpg" to show the fingerprints
+apt_repos:
+ google:
+ key_id: EB4C1BFD4F042F6DDDCCEC917721F63BD38B4796
+ key_url: https://dl.google.com/linux/linux_signing_key.pub
+ state: "{{ apt_repos_google_state | default('absent') }}"
+
+ google-cloud-sdk:
+ url: http://packages.cloud.google.com/apt
+ distro: cloud-sdk-sid-unstable
+ sections: main
+ key_id: 54A647F9048D5688D7DA2ABE6A030B21BA07F4FB
+ key_url: https://packages.cloud.google.com/apt/doc/apt-key.gpg
+ state: "{{ apt_repos_google_cloud_sdk_state | default('absent') }}"
+
+ openmodelica:
+ url: http://build.openmodelica.org/apt
+ distro: jessie
+ sections: release
+ key_id: D229AF1CE5AED74E5F59DF303A59B53664970947
+ key_url: http://build.openmodelica.org/apt/openmodelica.asc
+ state: "{{ apt_repos_openmodelica_state | default('absent') }}"
+
+ dropbox:
+ url: http://linux.dropbox.com/debian
+ distro: sid
+ sections: main
+ key_id: FC918B335044912E
+ keyserver: keyserver.ubuntu.com
+ state: "{{ apt_repos_dropbox_state | default('absent') }}"
+
+ docker:
+ url: "[arch=amd64] https://download.docker.com/linux/debian"
+ distro: stretch
+ sections: stable
+ key_id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
+ key_url: https://download.docker.com/linux/debian/gpg
+ state: "{{ apt_repos_docker_state | default('absent') }}"
+
+ picoscope:
+ url: http://labs.picotech.com/debian/
+ distro: picoscope
+ sections: main
+ key_id: 790128FE0D37172A2C56ACB16964D13AA2A43CCE
+ key_url: http://labs.picotech.com/debian/dists/picoscope/Release.gpg.key
+ state: "{{ apt_repos_picoscope_state | default('absent') }}"
+
+ skype:
+ state: "{{ apt_repos_skype_state | default('absent') }}"
+
+ skype-stable:
+ state: "{{ apt_repos_skype_stable_state | default('absent') }}"
+
+ skype-unstable:
+ url: "[arch=amd64] https://repo.skype.com/deb"
+ distro: unstable
+ sections: main
+ key_id: 1F3045A5DF7587C3
+ keyserver: hkp://keyserver.ubuntu.com:80
+ state: "{{ apt_repos_skype_unstable_state | default('absent') }}"
+
+ signal:
+ url: "[arch=amd64] https://updates.signal.org/desktop/apt"
+ distro: xenial
+ sections: main
+ key_id: DBA36B5181D0C816F630E889D980A17457F6FB06
+ key_url: https://updates.signal.org/desktop/apt/keys.asc
+ state: "{{ apt_repos_signal_state | default('absent') }}"
+
+ spotify:
+ url: http://repository.spotify.com
+ distro: testing
+ sections: non-free
+ key_id: A87FF9DF48BF1C90
+ keyserver: hkp://keyserver.ubuntu.com:80
+ state: "{{ apt_repos_spotify_state | default('absent') }}"
+
+ nodesource:
+ state: absent
+ url: https://deb.nodesource.com/node_8.x
+ distro: sid
+ sections: main
+ key_id: 1655A0AB68576280
+ keyserver: hkp://keyserver.ubuntu.com:80
+ state: "{{ apt_repos_nodesource_state | default('absent') }}"
+
+ nextcloud:
+ url: http://ppa.launchpad.net/nextcloud-devs/client/ubuntu
+ distro: cosmic
+ sections: main
+ key_id: 1FCD77DD0DBEF5699AD2610160EE47FBAD3DD469
+ keyserver: hkp://keyserver.ubuntu.com:80
+ state: "{{ apt_repos_nextcloud_state | default('absent') }}"
+
+ heroku:
+ url: http://toolbelt.heroku.com/ubuntu
+ distro: ./
+ sections: ''
+ key_id: C927EBE00F1B0520
+ keyserver: hkp://keyserver.ubuntu.com:80
+ state: "{{ apt_repos_heroku_state | default('absent') }}"
+
+ atom:
+ url: "[arch=amd64] https://packagecloud.io/AtomEditor/atom/any/"
+ distro: any
+ sections: main
+ key_id: 0A0FAB860D48560332EFB581B75442BBDE9E3B09
+ key_url: https://packagecloud.io/AtomEditor/atom/gpgkey
+ state: "{{ apt_repos_atom_state | default('absent') }}"
+
+ souffle:
+ url: https://dl.bintray.com/souffle-lang/deb-unstable
+ distro: disco
+ sections: main
+ key_id: 379CE192D401AB61
+ keyserver: hkp://keyserver.ubuntu.com:80
+ state: "{{ apt_repos_souffle_state | default('absent') }}"
+
+ slack:
+ url: https://packagecloud.io/slacktechnologies/slack/debian/
+ distro: jessie
+ sections: main
+ key_id: C6ABDCF64DB9A0B2
+ keyserver: hkp://keyserver.ubuntu.com:80
+ state: "{{ apt_repos_slack_state | default('absent') }}"
+
+ postgresql:
+ url: http://apt.postgresql.org/pub/repos/apt/
+ distro: sid-pgdg
+ sections: main
+ key_id: B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
+ keyserver: hkp://keyserver.ubuntu.com:80
+ filename: apt_postgresql_org_pub_repos_apt.list
+ state: "{{ apt_repos_postgresql_state | default('absent') }}"
diff --git a/ansible/group_vars/workstation/apt-repos.yml b/ansible/group_vars/workstation/apt-repos.yml
index 3241fb2..20447e3 100644
--- a/ansible/group_vars/workstation/apt-repos.yml
+++ b/ansible/group_vars/workstation/apt-repos.yml
@@ -1,120 +1,18 @@
-# Use "gpp foo.gpg" to show the fingerprints
-apt_repos:
- google:
- key_id: EB4C1BFD4F042F6DDDCCEC917721F63BD38B4796
- key_url: https://dl.google.com/linux/linux_signing_key.pub
-
- google-cloud-sdk:
- url: http://packages.cloud.google.com/apt
- distro: cloud-sdk-sid-unstable
- sections: main
- key_id: 54A647F9048D5688D7DA2ABE6A030B21BA07F4FB
- key_url: https://packages.cloud.google.com/apt/doc/apt-key.gpg
-
- openmodelica:
- url: http://build.openmodelica.org/apt
- distro: jessie
- sections: release
- key_id: D229AF1CE5AED74E5F59DF303A59B53664970947
- key_url: http://build.openmodelica.org/apt/openmodelica.asc
-
- dropbox:
- url: http://linux.dropbox.com/debian
- distro: sid
- sections: main
- key_id: FC918B335044912E
- keyserver: keyserver.ubuntu.com
-
- docker:
- url: "[arch=amd64] https://download.docker.com/linux/debian"
- distro: stretch
- sections: stable
- key_id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
- key_url: https://download.docker.com/linux/debian/gpg
-
- picoscope:
- url: http://labs.picotech.com/debian/
- distro: picoscope
- sections: main
- key_id: 790128FE0D37172A2C56ACB16964D13AA2A43CCE
- key_url: http://labs.picotech.com/debian/dists/picoscope/Release.gpg.key
-
- skype:
- state: absent
-
- skype-stable:
- state: absent
-
- skype-unstable:
- url: "[arch=amd64] https://repo.skype.com/deb"
- state: present
- distro: unstable
- sections: main
- key_id: 1F3045A5DF7587C3
- keyserver: hkp://keyserver.ubuntu.com:80
-
- signal:
- url: "[arch=amd64] https://updates.signal.org/desktop/apt"
- distro: xenial
- sections: main
- key_id: DBA36B5181D0C816F630E889D980A17457F6FB06
- key_url: https://updates.signal.org/desktop/apt/keys.asc
-
- spotify:
- url: http://repository.spotify.com
- distro: testing
- sections: non-free
- key_id: A87FF9DF48BF1C90
- keyserver: hkp://keyserver.ubuntu.com:80
-
- nodesource:
- state: absent
- url: https://deb.nodesource.com/node_8.x
- distro: sid
- sections: main
- key_id: 1655A0AB68576280
- keyserver: hkp://keyserver.ubuntu.com:80
-
- nextcloud:
- url: http://ppa.launchpad.net/nextcloud-devs/client/ubuntu
- distro: cosmic
- sections: main
- key_id: 1FCD77DD0DBEF5699AD2610160EE47FBAD3DD469
- keyserver: hkp://keyserver.ubuntu.com:80
- state: absent
-
- heroku:
- url: http://toolbelt.heroku.com/ubuntu
- distro: ./
- sections: ''
- key_id: C927EBE00F1B0520
- keyserver: hkp://keyserver.ubuntu.com:80
-
- atom:
- url: "[arch=amd64] https://packagecloud.io/AtomEditor/atom/any/"
- distro: any
- sections: main
- key_id: 0A0FAB860D48560332EFB581B75442BBDE9E3B09
- key_url: https://packagecloud.io/AtomEditor/atom/gpgkey
-
- souffle:
- url: https://dl.bintray.com/souffle-lang/deb-unstable
- distro: disco
- sections: main
- key_id: 379CE192D401AB61
- keyserver: hkp://keyserver.ubuntu.com:80
-
- slack:
- url: https://packagecloud.io/slacktechnologies/slack/debian/
- distro: jessie
- sections: main
- key_id: C6ABDCF64DB9A0B2
- keyserver: hkp://keyserver.ubuntu.com:80
-
- postgresql:
- url: http://apt.postgresql.org/pub/repos/apt/
- distro: sid-pgdg
- sections: main
- key_id: B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
- keyserver: hkp://keyserver.ubuntu.com:80
- filename: apt_postgresql_org_pub_repos_apt.list
+apt_repos_google_state: present
+apt_repos_google_cloud_sdk_state: present
+apt_repos_openmodelica_state: present
+apt_repos_dropbox_state: present
+apt_repos_docker_state: present
+apt_repos_picoscope_state: present
+apt_repos_skype_state: present
+apt_repos_skype_stable_state: present
+apt_repos_skype_unstable_state: present
+apt_repos_signal_state: present
+apt_repos_spotify_state: present
+apt_repos_nodesource_state: present
+apt_repos_nextcloud_state: present
+apt_repos_heroku_state: present
+apt_repos_atom_state: present
+apt_repos_souffle_state: present
+apt_repos_slack_state: present
+apt_repos_postgresql_state: present
diff --git a/ansible/roles/apt-repos/defaults/main.yml b/ansible/roles/apt-repos/defaults/main.yml
index 80975f0..6c83d0c 100644
--- a/ansible/roles/apt-repos/defaults/main.yml
+++ b/ansible/roles/apt-repos/defaults/main.yml
@@ -1 +1 @@
-apt_repos:
+# This has to be a dict apt_repos:
diff --git a/ansible/roles/apt-repos/tasks/main.yml b/ansible/roles/apt-repos/tasks/main.yml
index 7a571d3..2789073 100644
--- a/ansible/roles/apt-repos/tasks/main.yml
+++ b/ansible/roles/apt-repos/tasks/main.yml
@@ -1,4 +1,4 @@
-- with_dict: "{{ apt_repos|default('[]') }}"
+- with_dict: "{{ apt_repos if apt_repos is defined else {} }}"
include_tasks: repo.yml
vars:
state: "{{ item.value.state | default('present') }}"