summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-10-19 15:10:09 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-10-19 15:10:09 +0200
commit388257d3e17bc8aada2926cf3015f47f0d252311 (patch)
tree069655cf814bb0e21954e581ad0f9320e332e1de
parentadd openbsd 7.0 (diff)
switch back to ansible PPA for focal
-rw-r--r--chaos-at-home/ch-equinox-t450s.yml5
-rw-r--r--chaos-at-home/ch-equinox-ws.yml5
-rw-r--r--inventory/host_vars/ch-equinox-t450s.yml23
-rw-r--r--inventory/host_vars/ch-equinox-ws.yml23
-rw-r--r--roles/apt-repo/ansible/files/repo.gpgbin0 -> 1132 bytes
-rw-r--r--roles/apt-repo/ansible/tasks/main.yml20
6 files changed, 32 insertions, 44 deletions
diff --git a/chaos-at-home/ch-equinox-t450s.yml b/chaos-at-home/ch-equinox-t450s.yml
index f2dc1bdc..dc8585ad 100644
--- a/chaos-at-home/ch-equinox-t450s.yml
+++ b/chaos-at-home/ch-equinox-t450s.yml
@@ -9,6 +9,7 @@
- role: core/cpu-microcode
- role: apt-repo/backports
- role: apt-repo/spreadspace
+ - role: apt-repo/ansible
- role: apt-repo/tor-project
- role: apt-repo/kubic-project
- role: apt-repo/kubernetes
@@ -21,10 +22,6 @@
- role: network/wireguard/base
- role: ws/minet
post_tasks:
- - name: install ansible via pip
- pip:
- name: ansible>=4.4,<5.0
-
- name: disable caps-lock
lineinfile:
path: /etc/default/keyboard
diff --git a/chaos-at-home/ch-equinox-ws.yml b/chaos-at-home/ch-equinox-ws.yml
index 9c6e6b5f..c51f5aec 100644
--- a/chaos-at-home/ch-equinox-ws.yml
+++ b/chaos-at-home/ch-equinox-ws.yml
@@ -10,6 +10,7 @@
- role: network/wakeonlan
- role: apt-repo/backports
- role: apt-repo/spreadspace
+ - role: apt-repo/ansible
- role: apt-repo/tor-project
- role: apt-repo/kubic-project
- role: apt-repo/kubernetes
@@ -17,10 +18,6 @@
- role: ws/base
- role: core/admin-users
post_tasks:
- - name: install ansible via pip
- pip:
- name: ansible>=4.4,<5.0
-
- name: disable caps-lock
lineinfile:
path: /etc/default/keyboard
diff --git a/inventory/host_vars/ch-equinox-t450s.yml b/inventory/host_vars/ch-equinox-t450s.yml
index c123004a..71a46cb6 100644
--- a/inventory/host_vars/ch-equinox-t450s.yml
+++ b/inventory/host_vars/ch-equinox-t450s.yml
@@ -181,8 +181,10 @@ ws_base_extra_packages:
- pv
- pwgen
- python3-autopep8
+ - python3-netaddr
- python3-pandas
- - python3-paramiko
+ - python3-passlib
+ - python3-pip
- python3-plotly
- python3-ruamel.yaml
- python3-sphinx
@@ -245,6 +247,8 @@ ws_base_extra_packages:
# needs apt-repo/spreadspace
- go
- info-beamer
+ # needs apt-repo/ansible
+ - ansible
# needs apt-repo/tor-project
- tor
- tor-geoipdb
@@ -259,23 +263,6 @@ ws_base_extra_packages:
# needs apt-repo/nordvpn
- nordvpn
-## ansible in focal is outdated and the PPA is currently broken
-## will install ansible via pip but listing the deps here:
- # - ansible
- - python3-argcomplete
- - python3-crypto
- - python3-cryptography
- - python3-distutils
- - python3-dnspython
- - python3-httplib2
- - python3-jinja2
- - python3-netaddr
- - python3-passlib
- # resolvelib is not packaged for current ubuntu releases - also ansible needs special versions -> leave it to pip
- # - python3-resolvelib
- - python3-yaml
- - python3-pip
-
ws_minet_wired_interface_name: enp0s25
ws_minet_wired_interface_module: e1000e
diff --git a/inventory/host_vars/ch-equinox-ws.yml b/inventory/host_vars/ch-equinox-ws.yml
index cd93c242..c6219d75 100644
--- a/inventory/host_vars/ch-equinox-ws.yml
+++ b/inventory/host_vars/ch-equinox-ws.yml
@@ -178,8 +178,10 @@ ws_base_extra_packages:
- pv
- pwgen
- python3-autopep8
+ - python3-netaddr
- python3-pandas
- - python3-paramiko
+ - python3-passlib
+ - python3-pip
- python3-plotly
- python3-ruamel.yaml
- python3-sphinx
@@ -243,6 +245,8 @@ ws_base_extra_packages:
# needs apt-repo/spreadspace
- go
- info-beamer
+ # needs apt-repo/ansible
+ - ansible
# needs apt-repo/tor-project
- tor
- tor-geoipdb
@@ -255,23 +259,6 @@ ws_base_extra_packages:
# needs apt-repo/riot
- element-desktop
-## ansible in focal is outdated and the PPA is currently broken
-## will install ansible via pip but listing the deps here:
- # - ansible
- - python3-argcomplete
- - python3-crypto
- - python3-cryptography
- - python3-distutils
- - python3-dnspython
- - python3-httplib2
- - python3-jinja2
- - python3-netaddr
- - python3-passlib
- # resolvelib is not packaged for current ubuntu releases - also ansible needs special versions -> leave it to pip
- # - python3-resolvelib
- - python3-yaml
- - python3-pip
-
## needs PPA or other external repo ??
# - bazel
# - deadbeef
diff --git a/roles/apt-repo/ansible/files/repo.gpg b/roles/apt-repo/ansible/files/repo.gpg
new file mode 100644
index 00000000..1731dd2b
--- /dev/null
+++ b/roles/apt-repo/ansible/files/repo.gpg
Binary files differ
diff --git a/roles/apt-repo/ansible/tasks/main.yml b/roles/apt-repo/ansible/tasks/main.yml
new file mode 100644
index 00000000..f3ed409f
--- /dev/null
+++ b/roles/apt-repo/ansible/tasks/main.yml
@@ -0,0 +1,20 @@
+---
+- name: add repository key
+ copy:
+ src: repo.gpg
+ dest: /etc/apt/keyrings/ansible.gpg
+ register: apt_repo_ansible_key
+
+- name: add repository entry
+ copy:
+ content: |
+ deb [signed-by=/etc/apt/keyrings/ansible.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu {{ ansible_distribution_release }} main
+ dest: /etc/apt/sources.list.d/ansible.list
+ register: apt_repo_ansible_sources
+
+- name: update apt cache
+ when: apt_repo_ansible_key is changed or
+ apt_repo_ansible_sources is changed
+ command: apt-get update
+ args:
+ warn: false