diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | packages.yml | 34 | ||||
-rw-r--r-- | setup.yml | 17 |
3 files changed, 36 insertions, 19 deletions
@@ -3,8 +3,8 @@ BACKUP := backup setup: ansible-playbook -i inventory.ini --diff setup.yml -update: - ansible -i inventory.ini -b -m ansible.builtin.package --args 'state=latest name=*' ship.lan +packages: + ansible-playbook -i inventory.ini --diff packages.yml backup: ssh -t ship.lan "test -d $(BACKUP) \ diff --git a/packages.yml b/packages.yml new file mode 100644 index 0000000..fe22ff1 --- /dev/null +++ b/packages.yml @@ -0,0 +1,34 @@ + +- name: ship setup + hosts: all + gather_facts: no + vars: + user: "{{ '$USER' | expandvars }}" + data: "{{ '$HOME/services' | expandvars }}" + + tasks: + + # -- UPDATE ALL ------------------------------------------------------------ + + - name: update-packages + become: true + ansible.builtin.package: + name: "*" + state: latest + + # -- PACKAGES -------------------------------------------------------------- + + - name: install-packages + become: true + ansible.builtin.package: + name: "{{ item }}" + state: latest + loop: + - vim + - podman + - tmux + - git + - ncdu + - restic + # For restic mount. + - fuse @@ -38,23 +38,6 @@ # https://docs.ansible.com/ansible/latest/collections/ansible/builtin/command_module.html#parameter-creates creates: "/var/lib/systemd/linger/{{ user }}" - # -- PACKAGES -------------------------------------------------------------- - - - name: install-packages - become: true - ansible.builtin.package: - name: "{{ item }}" - state: latest - loop: - - vim - - podman - - tmux - - git - - ncdu - - restic - # For restic mount. - - fuse - # -- COPY FILES ------------------------------------------------------------ - name: copy-files |