- hosts: mirror-git remote_user: debian become: yes roles: - role: sane_debian_system - role: unix_users - role: self-updating-system - role: mail-client tasks: - name: "configure ssh client" copy: src: mirror_ssh_config dest: /home/liw/.ssh/config owner: liw group: liw mode: 0644 - name: "install git and more" apt: state: present name: - git - moreutils - psmisc - name: "configure git" copy: src: mirror_git_config dest: /home/liw/.gitconfig owner: liw group: liw - name: "install list of repositories to mirror" copy: src: mirror-list dest: /etc/mirror-git.list - name: "install script to mirror gitlab to git.liw.fi" copy: src: mirror-git.sh dest: /usr/local/bin/gitlab-to-git.liw.fi mode: 0755 - name: "set up cron job to mirror git" cron: name: "mirror git" user: liw hour: "*" minute: "0" job: | chronic /usr/local/bin/gitlab-to-git.liw.fi vars: ansible_python_interpreter: /usr/bin/python3 sane_debian_system_version: 2 sane_debian_system_hostname: mirror-git sane_debian_system_codename: bullseye unix_users_version: 2 unix_users: - username: root authorized_keys: | {{ liw_personal_ssh_pub }} - username: debian authorized_keys: | {{ liw_personal_ssh_pub }} - username: liw comment: Lars Wirzenius sudo: true authorized_keys: | {{ liw_personal_ssh_pub }} ssh_key: | {{ lookup('pipe', 'pass show ssh/liw@mirror-git') }} ssh_key_pub: | {{ lookup('pipe', 'pass show ssh/liw@mirror-git.pub') }} mailname: mirror-git.vm.liw.fi hostname: "{{ sane_debian_system_hostname }}" relayhost: pieni.net:587 smarthost: pieni.net smarthost_user: pienirelay smarthost_password: "{{ lookup('pipe', 'pass show pieni.net/pienirelay') }}"