diff --git a/gen_bootstrap.yml b/gen_bootstrap.yml index 36d45c9..2f066a8 100755 --- a/gen_bootstrap.yml +++ b/gen_bootstrap.yml @@ -80,7 +80,7 @@ dest: /mnt/cloud/Passwords/secrets.tar.gz.enc 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: path: /mnt/archives_critiques/secrets state: directory @@ -97,12 +97,15 @@ path: "{{ WORKDIR }}/secrets.tar.gz.enc" 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 #do # git clone https://git.scimetis.net/yohan/${name}.git ${DIRECTORY}/${name}