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