From 21f9c31a74a55ef19bfc7c2dc6728e59d726978f Mon Sep 17 00:00:00 2001 From: Micke Nordin <hej@mic.ke> Date: Mon, 13 Nov 2023 16:46:48 +0100 Subject: [PATCH] Set up more workstuff --- playbooks/sunet.yaml | 22 ++++++++++++++++++++-- setup.yaml | 1 + 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/playbooks/sunet.yaml b/playbooks/sunet.yaml index 3666663..3571dd6 100644 --- a/playbooks/sunet.yaml +++ b/playbooks/sunet.yaml @@ -4,15 +4,21 @@ vars: uid: "{{ lookup('env','USER') }}" gitops: git+ssh://git@gitops.sunet.se + github: git+ssh://git@github.com/SUNET + platform: git+ssh://git@platform.sunet.se:22022/Drive opsrepos: - sunet-drive-ops - mail-ops - platform-ops + puppetrepos: + - puppet-sunet + platformrepos: + - sunetdrive + connection: local become: false tasks: - name: Create sunet folders - become: true ansible.builtin.file: dest: /home/{{ uid }}/sunet/{{ item }} state: directory @@ -22,7 +28,19 @@ - puppet - name: Get gitops ops-repos ansible.builtin.command: - chdir: /home/{{ uid }}/sources/ + chdir: /home/{{ uid }}/sunet/ops cmd: git clone {{ gitops }}/{{ item }} creates: /home/{{ uid }}/sunet/ops/{{ item }} loop: "{{ opsrepos }}" + - name: Get github puppet-repos + ansible.builtin.command: + chdir: /home/{{ uid }}/sunet/puppet + cmd: git clone {{ github }}/{{ item }} + creates: /home/{{ uid }}/sunet/puppet/{{ item }} + loop: "{{ puppetrepos }}" + - name: Get platform puppet-repos + ansible.builtin.command: + chdir: /home/{{ uid }}/sunet/puppet + cmd: git clone {{ platform }}/{{ item }} + creates: /home/{{ uid }}/sunet/puppet/{{ item }} + loop: "{{ platformrepos }}" diff --git a/setup.yaml b/setup.yaml index 9c84815..9483012 100644 --- a/setup.yaml +++ b/setup.yaml @@ -6,6 +6,7 @@ - import_playbook: playbooks/pass.yaml - import_playbook: playbooks/ssh.yaml - import_playbook: playbooks/slack.yaml +- import_playbook: playbooks/sunet.yaml - import_playbook: playbooks/sway.yaml - import_playbook: playbooks/zsh.yaml # needs pass