diff --git a/backup_check.yaml b/backup_check.yaml new file mode 100644 index 0000000..6ddc0d0 --- /dev/null +++ b/backup_check.yaml @@ -0,0 +1,37 @@ +--- +- name: backup check + hosts: all + become: true + gather_facts: true + + tasks: + + - name: make backup folder + ansible.builtin.file: + path: "/check_backup/" + owner: "ansibleuser" + group: "ansibleuser" + mode: '0700' + state: "directory" + + - name: delete old file + ansible.builtin.file: + path: "/check_backup/check_{{ ansible_hostname }}.tgz" + state: "absent" + + - name: create archive + community.general.archive: + dest: "/check_backup/check_{{ ansible_hostname }}.tgz" + path: "/var/lib/docker/volumes" + owner: "ansibleuser" + + - name: create sudo permision + lineinfile: + path: "/etc/sudoers.d/root" + create: true + state: present + line: "root ALL=(ansibleuser) NOPASSWD: ALL" + + - name: scp file into safety + ansible.builtin.shell: 'scp -o "StrictHostKeyChecking accept-new" /check_backup/check_{{ ansible_hostname }}.tgz ansibleuser@10.10.0.2:/home/backup_ansible/' + become: false diff --git a/install_portainer.yaml b/install_portainer.yaml index 11faa4f..53e25ea 100644 --- a/install_portainer.yaml +++ b/install_portainer.yaml @@ -21,8 +21,8 @@ recreate: no restart_policy: always published_ports: - - "8000:8000/tcp" - - "9443:9443/tcp" + - "80:8000/tcp" + - "443:9443/tcp" volumes: - /var/run/docker.sock:/var/run/docker.sock - portainer_data:/data diff --git a/install_semaphore.yaml b/install_semaphore.yaml index 8bf3ee2..78f29e0 100644 --- a/install_semaphore.yaml +++ b/install_semaphore.yaml @@ -185,7 +185,7 @@ recreate: yes restart_policy: always published_ports: - - "3000:3000/tcp" + - "80:3000/tcp" volumes: - "semaphore_etc:/etc/semaphore" - "semaphore_lib:/var/lib/semaphore"