From add9a91d005d5ce5018138a6540f484505d862d6 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Sun, 12 Feb 2023 14:43:12 +0100 Subject: [PATCH] style(flucky): name of tasks, use built in module --- .drone.yml | 52 ---------------------------------------------- tasks/git_user.yml | 6 +++--- tasks/main.yml | 4 ++-- 3 files changed, 5 insertions(+), 57 deletions(-) diff --git a/.drone.yml b/.drone.yml index d72bc8f..c147d5c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,55 +40,3 @@ trigger: event: exclude: - tag - ---- -kind: pipeline -type: kubernetes -name: sync - -platform: - os: linux - arch: amd64 - -steps: -- name: github - image: docker.io/appleboy/drone-git-push:latest - resources: - limits: - cpu: 50 - memory: 25M - settings: - branch: master - remote: ssh://git@github.com/volker-raschek/git-role.git - force: true - ssh_key: - from_secret: ssh_key - -- name: email-notification - environment: - PLUGIN_HOST: - from_secret: smtp_host - PLUGIN_USERNAME: - from_secret: smtp_username - PLUGIN_PASSWORD: - from_secret: smtp_password - PLUGIN_FROM: - from_secret: smtp_mail_address - image: docker.io/drillster/drone-email:latest - resources: - limits: - cpu: 50 - memory: 25M - when: - status: - - changed - - failure - -trigger: - branch: - - master - event: - - cron - - push - repo: - - volker.raschek/git-role diff --git a/tasks/git_user.yml b/tasks/git_user.yml index 0b659b5..f8f8269 100644 --- a/tasks/git_user.yml +++ b/tasks/git_user.yml @@ -1,11 +1,11 @@ --- -- name: Get entity for user {{ item.key }} - getent: +- name: "Determine entries via NSS for unix user: {{ item.key }}" + ansible.builtin.getent: database: passwd key: "{{ item.key }}" -- name: Create git config directory for {{ item.key }} +- name: "Create git config directory for unix user: {{ item.key }}" ansible.builtin.file: dest: "{{ getent_passwd[item.key][4] }}/.config/git" owner: "{{ item.key }}" diff --git a/tasks/main.yml b/tasks/main.yml index f506758..f483be1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Include OS-specific variables - include_vars: "{{ ansible_os_family }}.yml" + ansible.builtin.include_vars: "{{ ansible_os_family }}.yml" - name: Install git and dependencies ansible.builtin.package: @@ -10,6 +10,6 @@ with_items: "{{ git_package_names }}" - name: Configure git - include_tasks: git_user.yml + ansible.builtin.include_tasks: git_user.yml with_dict: - "{{ git_users }}"