Commit 45520f72 authored by nanahira's avatar nanahira

update

parent a3f35988
.:53 {
forward . tls://8.8.8.8 tls://8.8.4.4 {
tls_servername dns.google
}
}
version: '2.4'
services:
freedns:
restart: always
image: mycard/freedns-go
ports:
- '53:53'
- '53:53/udp'
command: "freedns-go -f 114.114.114.114:53 -c coredns:53 -l 0.0.0.0:53"
coredns:
restart: always
image: coredns/coredns
volumes:
- ./Corefile:/Corefile:ro
apt-cacher-ng:
restart: always
image: mycard/apt-cacher-ng
dns: 114.114.114.114
ports:
- '80:3142'
volumes:
- ./apt-cacher-ng/cache:/var/cache/apt-cacher-ng
......@@ -28,11 +28,11 @@
when: "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version|int >= 18) or (ansible_distribution == 'Debian' and ansible_distribution_major_version|int >= 9)"
- name: Docker key
apt_key:
url: https://download.docker.com/linux/debian/gpg
url: https://mirrors.aliyun.com/docker-ce/linux/debian/gpg
when: "ansible_distribution == 'Debian'"
- name: Docker source
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable
repo: deb [arch=amd64] https://mirrors.aliyun.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable
filename: docker
when: "ansible_distribution == 'Debian'"
- name: Docker for Debian
......
---
- hosts: utility
remote_user: root
tasks:
- name: pre packages
apt:
update_cache: true
name: curl,wget,apt-transport-https,lsb-release,gnupg
state: latest
- name: Docker key
apt_key:
url: https://mirrors.aliyun.com/docker-ce/linux/debian/gpg
- name: Docker source
apt_repository:
repo: deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable
filename: docker
- name: apt
apt:
update_cache: true
name: docker-ce,python-backports-shutil-get-terminal-size,python-backports.ssl-match-hostname,python-pip,rsync
state: latest
- name: docker service
systemd:
name: docker
state: started
- name: docker-compose pip
pip:
name: pip
state: latest
extra_args: -i https://mirrors.aliyun.com/pypi/simple/
- name: docker-compose
pip:
name: docker-compose
state: latest
extra_args: -i https://mirrors.aliyun.com/pypi/simple/
- name: utility directory
file:
path: /root/utility
state: directory
- name: related files
synchronize:
src: ./files/utility/
dest: /root/utility
- name: docker-compose up -d
docker_service:
project_src: /root/utility
remove_orphans: true
pull: true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment