Improve gen_bootstrap.yml.

This commit is contained in:
yohan 2023-10-21 22:33:57 +02:00
parent a6f6df2d00
commit 499f2a83c5

View File

@ -80,7 +80,7 @@
dest: /mnt/cloud/Passwords/secrets.tar.gz.enc dest: /mnt/cloud/Passwords/secrets.tar.gz.enc
when: copy_output is changed when: copy_output is changed
- name: Create /mnt/archives_critiques/secrets directory in serveur-appart - name: Create /mnt/archives_critiques/secrets directory on serveur-appart
ansible.builtin.file: ansible.builtin.file:
path: /mnt/archives_critiques/secrets path: /mnt/archives_critiques/secrets
state: directory state: directory
@ -97,12 +97,15 @@
path: "{{ WORKDIR }}/secrets.tar.gz.enc" path: "{{ WORKDIR }}/secrets.tar.gz.enc"
register: stats_output register: stats_output
- debug: var=stats_output - name: Copy new secrets on serveur-appart
ansible.builtin.copy:
src: "{{ WORKDIR }}/secrets.tar.gz.enc"
dest: "/mnt/archives_critiques/secrets/secrets.tar.gz.enc-{{ stats_output.stat.checksum }}"
remote_user: yohan
vars:
ansible_ssh_port: 2224
delegate_to: chez-yohan.scimetis.net
#FILENAME=secrets.tar.gz.enc-$(sha1sum ${DIRECTORY}/secrets.tar.gz.enc | awk -F' ' '{print $1}')
#scp -P 2224 ${DIRECTORY}/secrets.tar.gz.enc yohan@chez-yohan.scimetis.net:/mnt/archives_critiques/secrets/$FILENAME
#rm -rf ${DIRECTORY}/secrets* ${DIRECTORY}/Documentation.md
#
#for name in docker-nextcloud-stack docker-reverse-proxy-stack docker-reverse-proxy docker-gogs-stack docker-mysql-stack docker-mysql systemd-mount-cinder-volume #for name in docker-nextcloud-stack docker-reverse-proxy-stack docker-reverse-proxy docker-gogs-stack docker-mysql-stack docker-mysql systemd-mount-cinder-volume
#do #do
# git clone https://git.scimetis.net/yohan/${name}.git ${DIRECTORY}/${name} # git clone https://git.scimetis.net/yohan/${name}.git ${DIRECTORY}/${name}