Commit e571d48a authored by Chris Croome's avatar Chris Croome
Browse files

bind9 removed

parent 10a98088
......@@ -71,6 +71,6 @@
# - syslog
- postfix
- theme
- bind
- resolv
- roundcube
......@@ -192,115 +192,118 @@
# Update an existing install
# https://mailcow.github.io/mailcow-dockerized-docs/install-update/
# THIS NEEDS UPDATING, SEE https://mailcow.github.io/mailcow-dockerized-docs/install-update/#step-1
### - block:
###
### - name: Local changes stashed
### command: git stash
### args:
### chdir: /var/mailcow
### become: yes
### become_user: mailcow
### register: git_stash
###
### - debug:
### msg: "The results of `git stash`: {{ git_stash.stdout }}"
###
### - name: Mailcow checked out
### git:
### repo: https://github.com/andryyy/mailcow-dockerized.git
### dest: /var/mailcow
### force: yes
### become: yes
### become_user: mailcow
###
### - name: Git stash list
### command: git stash list
### args:
### chdir: /var/mailcow
### become: yes
### become_user: mailcow
### register: git_stash_list
###
### - debug:
### msg: "The results of `git stash list`: {{ git_stash_list.stdout }}"
###
### - block:
###
### - name: Local stashed changes popped
### command: git stash pop
### args:
### chdir: /var/mailcow
### become: yes
### become_user: mailcow
### register: git_stash_pop
###
### - debug:
### msg: "The results of `git stash pop`: {{ git_stash_pop.stdout }}"
###
### when: git_stash_list.stdout != ""
###
### # https://github.com/mailcow/mailcow-dockerized/pull/203#issuecomment-299823762
### - name: Run docker-compose down
### command: docker-compose down
### args:
### chdir: /var/mailcow
### become: yes
### become_user: mailcow
###
### - name: Run docker-compose pull
### command: docker-compose pull
### args:
### chdir: /var/mailcow
### become: yes
### become_user: mailcow
###
### - name: Run docker-compose up -d --remove-orphans
### command: docker-compose up -d --remove-orphans
### args:
### chdir: /var/mailcow
### become: yes
### become_user: mailcow
###
### - name: Check for unused images
### shell: "docker images -f 'dangling=true' -q | xargs"
### args:
### chdir: /var/mailcow
### executable: /bin/bash
### become: yes
### become_user: mailcow
### register: docker_dangling_images
###
### - block:
###
### - name: Clean-up dangling (unused) images
### shell: "docker rmi -f {{ docker_dangling_images.stdout }}"
### args:
### chdir: /var/mailcow
### executable: /bin/bash
### become: yes
### become_user: mailcow
###
### when: docker_dangling_images.stdout != ""
###
### - name: Check for unused volumes
### command: docker volume ls -qf 'dangling=true'
### become: yes
### become_user: mailcow
### register: docker_dangling_volumes
###
### - block:
###
### - name: Clean-up dangling (unused) volumes
### shell: "docker volume rm {{ docker_dangling_volumes.stdout }}"
### args:
### chdir: /var/mailcow
### executable: /bin/bash
### become: yes
### become_user: mailcow
###
### when: docker_dangling_volumes.stdout != ""
###
### when: mailcow_git_directory.stat.exists == True
- block:
- name: Get updates/changes
command: git fetch origin master
args:
chdir: /var/mailcow
become: yes
become_user: mailcow
register: git_fetch_origin_master
- debug:
msg: "The results of `git fetch origin master`: {{ git_fetch_origin_master.stdout }}"
- name: Add all changed files to local clone
command: git add -A
args:
chdir: /var/mailcow
become: yes
become_user: mailcow
register: git_add
- debug:
msg: "The results of `git add -A`: {{ git_add.stdout }}"
- name: Get the date and time
command: date
register: git_commit_date
- name: Commit changes
command: git commit -m "Local config at {{ git_commit_date.stdout }}"
args:
chdir: /var/mailcow
become: yes
become_user: mailcow
register: git_commit
- debug:
msg: "The results of `git commit -m`: {{ git_commit.stdout }}"
- name: Merge changes, prefere mailcow repository
command: git merge -Xtheirs -Xpatience
args:
chdir: /var/mailcow
become: yes
become_user: mailcow
register: git_merge
- debug:
msg: "The results of `git merge -Xtheirs -Xpatience`: {{ git_merge.stdout }}"
# https://github.com/mailcow/mailcow-dockerized/pull/203#issuecomment-299823762
- name: Run docker-compose down
command: docker-compose down
args:
chdir: /var/mailcow
become: yes
become_user: mailcow
- name: Run docker-compose pull
command: docker-compose pull
args:
chdir: /var/mailcow
become: yes
become_user: mailcow
- name: Run docker-compose up -d --remove-orphans
command: docker-compose up -d --remove-orphans
args:
chdir: /var/mailcow
become: yes
become_user: mailcow
- name: Check for unused images
shell: "docker images -f 'dangling=true' -q | xargs"
args:
chdir: /var/mailcow
executable: /bin/bash
become: yes
become_user: mailcow
register: docker_dangling_images
- block:
- name: Clean-up dangling (unused) images
shell: "docker rmi -f {{ docker_dangling_images.stdout }}"
args:
chdir: /var/mailcow
executable: /bin/bash
become: yes
become_user: mailcow
when: docker_dangling_images.stdout != ""
- name: Check for unused volumes
command: docker volume ls -qf 'dangling=true'
become: yes
become_user: mailcow
register: docker_dangling_volumes
- block:
- name: Clean-up dangling (unused) volumes
shell: "docker volume rm {{ docker_dangling_volumes.stdout }}"
args:
chdir: /var/mailcow
executable: /bin/bash
become: yes
become_user: mailcow
when: docker_dangling_volumes.stdout != ""
when: mailcow_git_directory.stat.exists == True
- block:
......
---
- name: Set the local DNS servers for the bind9 container
template:
src: templates/named.conf.j2
dest: /var/mailcow/data/conf/bind9/named.conf
owner: mailcow
group: mailcow
mode: 0644
- name: Restart the bind9 container
command: docker-compose restart bind9-mailcow
args:
chdir: /var/mailcow
become: yes
become_user: mailcow
- name: Set the nameservers for {{ hostname }}
template:
src: templates/resolv.conf.j2
......
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