Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions ansible/maintenance/containerd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env ansible-playbook
---
- name: Sync containerd and dockerd
hosts: all
order: sorted
gather_facts: true
user: root
# serial: 1
tasks:
- name: Ensure certs.d/_default/ exists
file:
path: "{{item}}"
recurse: yes
state: directory
when: DOCKER_REGISTRY is defined
with_items:
- "/etc/containerd/certs.d/_default/"
- "/etc/dockerd/certs.d/_default/"

- name: Setup Default mirror for all registries
copy:
content: |
server = "https://{{DOCKER_REGISTRY[0]}}"
dest: "{{item}}"
when: DOCKER_REGISTRY is defined
with_items:
- "/etc/containerd/certs.d/_default/hosts.toml"
- "/etc/dockerd/certs.d/_default/hosts.toml"
15 changes: 15 additions & 0 deletions ansible/maintenance/etchosts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env ansible-playbook
---
- name: Sync /etc/hosts file with local host and group vars
hosts: all
order: sorted
gather_facts: true
user: root
# serial: 1
tasks:
- name: Configure hosts
copy:
content: |
{{etchosts}}
dest: /etc/hosts
when: etchosts is defined
Loading