From 1c30ded1c3232cea4eec525da6044c349af97e1a Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Wed, 26 Jun 2024 11:59:54 -0300 Subject: [PATCH] lint --- provision-pinky/setup_user.yml | 123 +++++++++++++++++---------------- 1 file changed, 62 insertions(+), 61 deletions(-) diff --git a/provision-pinky/setup_user.yml b/provision-pinky/setup_user.yml index 60789cd..4953bd5 100644 --- a/provision-pinky/setup_user.yml +++ b/provision-pinky/setup_user.yml @@ -3,64 +3,65 @@ hosts: servers become_method: ansible.builtin.sudo tasks: - - name: Install some packages - become: true - ansible.builtin.package: - name: - - git - - vim - - htop - - fish - - rsync - - restic - - vim - state: present - - name: Install Debian-specific packages - become: true - when: ansible_os_family == 'Debian' - ansible.builtin.apt: - name: - - ncurses-term - state: present - - name: Add the user ralsina - become: true - ansible.builtin.user: - name: ralsina - create_home: true - password_lock: true - shell: /usr/bin/fish - - name: Authorize ssh - become: true - ansible.posix.authorized_key: - user: ralsina - state: present - key: "{{ lookup('file', '/home/ralsina/.ssh/id_rsa.pub') }}" - - name: Make ralsina a sudoer - become: true - community.general.sudoers: - name: ralsina - user: ralsina - state: present - commands: ALL - nopassword: true - - name: Create fish config directory - ansible.builtin.file: - path: /home/ralsina/.config/fish/conf.d - recurse: true - state: directory - mode: '0755' - - name: Get starship installer - ansible.builtin.get_url: - url: https://starship.rs/install.sh - dest: /tmp/starship.sh - mode: '0755' - - name: Install starship - become: true - ansible.builtin.command: - cmd: sh /tmp/starship.sh -y - - name: Enable starship - ansible.builtin.copy: - dest: /home/ralsina/.config/fish/conf.d/starship.fish - mode: '0644' - content: | - starship init fish | source + - name: Install some packages + become: true + ansible.builtin.package: + name: + - git + - vim + - htop + - fish + - rsync + - restic + - vim + state: present + - name: Install Debian-specific packages + become: true + when: ansible_os_family == 'Debian' + ansible.builtin.apt: + name: + - ncurses-term + state: present + - name: Add the user ralsina + become: true + ansible.builtin.user: + name: ralsina + create_home: true + password_lock: true + shell: /usr/bin/fish + - name: Authorize ssh + become: true + ansible.posix.authorized_key: + user: ralsina + state: present + key: "{{ lookup('file', '/home/ralsina/.ssh/id_rsa.pub') }}" + - name: Make ralsina a sudoer + become: true + community.general.sudoers: + name: ralsina + user: ralsina + state: present + commands: ALL + nopassword: true + - name: Create fish config directory + ansible.builtin.file: + path: /home/ralsina/.config/fish/conf.d + recurse: true + state: directory + mode: '0755' + - name: Get starship installer + ansible.builtin.get_url: + url: https://starship.rs/install.sh + dest: /tmp/starship.sh + mode: '0755' + - name: Install starship + become: true + ansible.builtin.command: + cmd: sh /tmp/starship.sh -y + creates: /usr/local/bin/starship + - name: Enable starship + ansible.builtin.copy: + dest: /home/ralsina/.config/fish/conf.d/starship.fish + mode: '0644' + content: | + starship init fish | source