aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoransible_admin <capsul@cyberia.club>2020-12-16 21:45:41 +0000
committeransible_admin <capsul@cyberia.club>2020-12-16 21:45:41 +0000
commit087ce632d45ca1f32375ad24a19b2b31395333de (patch)
tree588ba5380ae0b12bf3d711aeeb329590325ab7fc
parentfd345f556e57f7c28b7a4aaaa33c18a9943f925f (diff)
downloadops-handbook-087ce632d45ca1f32375ad24a19b2b31395333de.tar.gz
ops-handbook-087ce632d45ca1f32375ad24a19b2b31395333de.tar.bz2
Add repos
-rw-r--r--ansible/roles/common/handlers/main.yml4
-rw-r--r--ansible/roles/common/tasks/main.yml9
-rw-r--r--ansible/roles/common/templates/apk_repositories.j26
3 files changed, 19 insertions, 0 deletions
diff --git a/ansible/roles/common/handlers/main.yml b/ansible/roles/common/handlers/main.yml
index 8eb1c7c..ff8ff3d 100644
--- a/ansible/roles/common/handlers/main.yml
+++ b/ansible/roles/common/handlers/main.yml
@@ -7,3 +7,7 @@
shell: |
/etc/init.d/iptables save
/etc/init.d/ip6tables save
+
+- name: update-apk
+ shell: |
+ apk update
diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml
index 6c05696..9b70022 100644
--- a/ansible/roles/common/tasks/main.yml
+++ b/ansible/roles/common/tasks/main.yml
@@ -60,6 +60,15 @@
group: root
mode: 0644
notify: restart-sshd
+
+- name: Configure repos
+ template:
+ src: apk_repositories.j2
+ dest: /etc/apk/repositories
+ owner: root
+ group: root
+ mode: 0644
+ notify: update-apk
- name: Configure Sudoers
# what were we replacing again?
diff --git a/ansible/roles/common/templates/apk_repositories.j2 b/ansible/roles/common/templates/apk_repositories.j2
new file mode 100644
index 0000000..0de882e
--- /dev/null
+++ b/ansible/roles/common/templates/apk_repositories.j2
@@ -0,0 +1,6 @@
+https://nl.alpinelinux.org/alpine/latest-stable/main
+https://nl.alpinelinux.org/alpine/latest-stable/community
+@edge https://nl.alpinelinux.org/alpine/edge/main
+@edge-community https://nl.alpinelinux.org/alpine/edge/community
+@edge-testing https://nl.alpinelinux.org/alpine/edge/testing
+@srht https://mirror.sr.ht/alpine/v3.12/sr.ht