style: fix some syntax
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
vincent 2023-08-24 15:04:13 +02:00
parent 5af4c52e82
commit a288c8a71b

View File

@ -1,33 +1,32 @@
---
# tasks file for ansible_bootstrap
- name: detect debian
raw: cat /etc/os-release|grep Debian||true
- name: Detect debian
ansible.builtin.raw: cat /etc/os-release|grep Debian||true
register: debian
- name: detect Rocky
raw: cat /etc/os-release|grep rocky||true
- name: Detect Rocky
ansible.builtin.raw: cat /etc/os-release|grep rocky||true
register: rocky
- name: detect arch
raw: cat /etc/os-release|grep Arch||true
- name: Detect arch
ansible.builtin.raw: cat /etc/os-release|grep Arch||true
register: arch
- name: "install python for rocky"
raw: dnf install python3 --assumeyes
- name: Install python for rocky
ansible.builtin.raw: dnf install python3 --assumeyes
when: rocky.stdout
- name: "install python for debian"
raw: apt-get install python3 --assume-yes
- name: Install python for debian
ansible.builtin.raw: apt-get install python3 --assume-yes
when: debian.stdout
- name: "install python on arch"
raw: pacman -Sy python --noconfirm
- name: Install python on arch
ansible.builtin.raw: pacman -Sy python --noconfirm
when: arch.stdout
- name: add local repo to mirrorlist
become: yes
- name: Add local repo to mirrorlist
become: true
lineinfile:
path: /etc/pacman.d/mirrorlist
line: "Server= {{system_arch_local_mirror}}/$repo/os/$arch"
@ -66,7 +65,7 @@
reboot:
reboot_timeout: 3600
when: arch.stdout and (upgrade.changed and "linux" in upgrade.packages)
become: yes
become: true
- name: Collect only selected facts
ansible.builtin.setup:
@ -74,24 +73,24 @@
- 'ansible_distribution'
- 'ansible_os_family'
- name: zsh install
- name: Zsh install
package:
state: present
name: zsh
update_cache: true # not required. Whether or not to refresh the master package lists. This can be run as part of a package installation or as a separate step.
- name: inetutils install
- name: Inetutils install
package:
state: present
name: inetutils
when: arch.stdout
- name: sudoers install
- name: Sudoers install
package:
state: present # not required. choices: absent;latest;present. Desired state of the package.
name: sudo # not required. Name or list of names of the packages to install, upgrade, or remove.
- name: create profil
- name: Create profil
user:
name: "ansible" # 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.
@ -100,7 +99,7 @@
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.
shell: /bin/bash
- name: set sudoers right
- name: Set sudoers right
lineinfile:
dest: "/etc/sudoers.d/ansible"
regexp: "{{ item.regexp }}"