Skip to content

Commit

Permalink
added ca settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fspv committed Oct 20, 2024
1 parent 9e866d7 commit 4458ef9
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 2 deletions.
3 changes: 3 additions & 0 deletions roles/ca-cert/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# key - ca name
# value - ca certificate
ca_cert: {}
3 changes: 3 additions & 0 deletions roles/ca-cert/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- name: handler update-ca-certificates
shell:
cmd: update-ca-certificates
2 changes: 2 additions & 0 deletions roles/ca-cert/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dependencies:
- { role: pkgmanager }
12 changes: 12 additions & 0 deletions roles/ca-cert/tasks/configs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- name: config custom ca certificates
copy:
content: "{{ item.value }}"
dest: "/usr/local/share/ca-certificates/{{ item.key }}.pem"
owner: root
group: root
mode: '0644'
with_dict: "{{ ca_cert }}"
notify:
- handler update-ca-certificates

- meta: flush_handlers
2 changes: 2 additions & 0 deletions roles/ca-cert/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- import_tasks: packages.yml
- import_tasks: configs.yml
3 changes: 3 additions & 0 deletions roles/ca-cert/tasks/packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- name: pkg
apt:
name: ca-certificates
1 change: 1 addition & 0 deletions roles/common-tweaks/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ dependencies:
- { role: user, when: ansible_distribution == "Ubuntu" }
- { role: pkgmanager }
- { role: tzdata }
- { role: ca-cert }
- { role: systemd }
- { role: apparmor }
- { role: tuxedo, when: ansible_system_vendor == "TUXEDO" }
Expand Down
2 changes: 0 additions & 2 deletions roles/ubuntu-devserver/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
dependencies:
- { role: bind }
- { role: resolv }
- { role: docker }
- { role: openvpn }
- { role: tailscale }
Expand Down

0 comments on commit 4458ef9

Please sign in to comment.