From 5f105ae8e9ae5a3f9ac0ef5f3b257950f1ed91d5 Mon Sep 17 00:00:00 2001 From: vincent Date: Tue, 29 Nov 2022 21:23:44 +0100 Subject: [PATCH] style: fix yaml --- ansible/molecule/default/molecule.yml | 5 ++--- ansible/molecule/default/prepare.yml | 4 ++-- ansible/playbooks/HashicorpStack.yml | 1 + ansible/playbooks/database.yml | 6 +++--- ansible/playbooks/music-player.yml | 1 - ansible/playbooks/server.yml | 2 +- ansible/playbooks/sssd.yml | 14 +++++++------- ansible/playbooks/user_config.yml | 1 + ansible/playbooks/wireguard.yml | 2 +- ansible/provisionning.yml | 6 +++--- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ansible/molecule/default/molecule.yml b/ansible/molecule/default/molecule.yml index 38f1219..d80e161 100644 --- a/ansible/molecule/default/molecule.yml +++ b/ansible/molecule/default/molecule.yml @@ -1,8 +1,8 @@ --- -prerun: false +prerun: false dependency: name: galaxy - enabled: False + enabled: false driver: name: lxd platforms: @@ -35,7 +35,6 @@ provisioner: name: ansible-lint inventory: host_vars: [] - links: group_vars: ../../group_vars hosts: ../../staging diff --git a/ansible/molecule/default/prepare.yml b/ansible/molecule/default/prepare.yml index 91f81f6..392ca87 100644 --- a/ansible/molecule/default/prepare.yml +++ b/ansible/molecule/default/prepare.yml @@ -1,9 +1,9 @@ +--- - hosts: all remote_user: root become: true gather_facts: false tasks: - name: Init pacman - ansible.builtin.include_role: + ansible.builtin.include_role: name: ansible_bootstrap - diff --git a/ansible/playbooks/HashicorpStack.yml b/ansible/playbooks/HashicorpStack.yml index 719b625..056b507 100644 --- a/ansible/playbooks/HashicorpStack.yml +++ b/ansible/playbooks/HashicorpStack.yml @@ -1,3 +1,4 @@ +--- - hosts: all roles: - role: ansible-consul diff --git a/ansible/playbooks/database.yml b/ansible/playbooks/database.yml index 8c2c41f..50d2258 100644 --- a/ansible/playbooks/database.yml +++ b/ansible/playbooks/database.yml @@ -5,12 +5,12 @@ roles: - role: ansible-role-postgresql become: true - tasks: + tasks: - name: add pg_read_all_data to dump community.postgresql.postgresql_membership: - target_roles: + target_roles: - dump groups: - - pg_read_all_data + - pg_read_all_data become: true become_user: "{{ postgresql_user }}" diff --git a/ansible/playbooks/music-player.yml b/ansible/playbooks/music-player.yml index 3c647ad..1edfb73 100644 --- a/ansible/playbooks/music-player.yml +++ b/ansible/playbooks/music-player.yml @@ -5,4 +5,3 @@ - cronie - hass-client-control - mpd - diff --git a/ansible/playbooks/server.yml b/ansible/playbooks/server.yml index b91ceb8..505072d 100644 --- a/ansible/playbooks/server.yml +++ b/ansible/playbooks/server.yml @@ -1,5 +1,5 @@ --- -- hosts: +- hosts: - homelab - VPS vars: diff --git a/ansible/playbooks/sssd.yml b/ansible/playbooks/sssd.yml index f97ceec..7058140 100644 --- a/ansible/playbooks/sssd.yml +++ b/ansible/playbooks/sssd.yml @@ -2,7 +2,7 @@ - hosts: all roles: - role: ansible-role-sssd - become: True + become: true tasks: - name: simulate login stat: @@ -12,12 +12,12 @@ when: sssd_configure == true - name: create profil user: - name: "{{user.name}}" # required. Name of the user to create, remove or modify. - create_home: yes # not required. Unless set to C(no), a home directory will be made for the user when the account is created or if the home directory does not exist.,Changed from C(createhome) to C(create_home) in version 2.5. - password: "{{userPassword}}" # not required. Optionally set the user's password to this crypted value.,On macOS systems, this value has to be cleartext. Beware of security issues.,See U(https://docs.ansible.com/ansible/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module) for details on various ways to generate these password values. - system: no # not required. When creating an account C(state=present), setting this to C(yes) makes the user a system account. This setting cannot be changed on existing users. - state: present # not required. choices: absent;present. Whether the account should exist or not, taking action if the state is different from what is stated. - ssh_key_file: .ssh/id_rsa # not required. Optionally specify the SSH key filename. If this is a relative filename then it will be relative to the user's home directory. + name: "{{user.name}}" + create_home: yes + password: "{{userPassword}}" + system: no + state: present + ssh_key_file: .ssh/id_rsa uid: "{{ user.uid }}" shell: /bin/bash when: sssd_configure is not defined or sssd_configure == false diff --git a/ansible/playbooks/user_config.yml b/ansible/playbooks/user_config.yml index ab89fbf..e2c0d2e 100644 --- a/ansible/playbooks/user_config.yml +++ b/ansible/playbooks/user_config.yml @@ -1,3 +1,4 @@ +--- - hosts: all vars: roles: diff --git a/ansible/playbooks/wireguard.yml b/ansible/playbooks/wireguard.yml index 561e21b..aa9dee3 100644 --- a/ansible/playbooks/wireguard.yml +++ b/ansible/playbooks/wireguard.yml @@ -2,4 +2,4 @@ - hosts: wireguard roles: - role: ansible-role-wireguard - become: True + become: true diff --git a/ansible/provisionning.yml b/ansible/provisionning.yml index 29f81b1..436b57a 100644 --- a/ansible/provisionning.yml +++ b/ansible/provisionning.yml @@ -10,8 +10,8 @@ remote_user: root vars: ansible_password: "{{ lookup('hashi_vault','secret=secrets/data/ansible/user:root') }}" - roles: + roles: - ansible_bootstrap - #- remote_user: "{{ user.name }}" - #import_playbook: site.yml +# - remote_user: "{{ user.name }}" +# import_playbook: site.yml