fixe trailling issue
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
vincent 2021-08-18 18:11:58 +02:00
parent d81fb9153a
commit 85f49c4455

View File

@ -6,8 +6,7 @@
register: debian register: debian
- name: "install python for debian" - name: "install python for debian"
raw: apt-get install python --assume-yes raw: apt-get install python --assume-yes
when: debian.stdout when: debian.stdout
- name: add local repo to mirrorlist - name: add local repo to mirrorlist
become: yes become: yes
@ -20,29 +19,27 @@
- name: upgrade system for arch - name: upgrade system for arch
pacman: pacman:
state: latest # not required. choices: absent;latest;present. Desired state of the package. state: latest # not required. choices: absent;latest;present. Desired state of the package.
upgrade: true # not required. Whether or not to upgrade whole system. upgrade: true # not required. Whether or not to upgrade whole system.
force: true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases. force: true # not required. When removing package - force remove package, without any checks. When update_cache - force redownload repo databases.
update_cache: true update_cache: true
become: yes become: yes
register: upgrade register: upgrade
when: not debian.stdout when: not debian.stdout
- name: upgrade system for debian - name: upgrade system for debian
apt: apt:
update_cache: yes # not required. Run the equivalent of C(apt-get update) before the operation. Can be run as part of the package installation or as a separate step. update_cache: yes # not required. Run the equivalent of C(apt-get update) before the operation. Can be run as part of the package installation or as a separate step.
only_upgrade: yes # not required. Only upgrade a package if it is already installed. only_upgrade: yes # not required. Only upgrade a package if it is already installed.
upgrade: full # not required. choices: dist;full;no;safe;yes. If yes or safe, performs an aptitude safe-upgrade.,If full, performs an aptitude full-upgrade.,If dist, performs an apt-get dist-upgrade.,Note: This does not upgrade a specific package, use state=latest for that.,Note: Since 2.4, apt-get is used as a fall-back if aptitude is not present. upgrade: full # not required. choices: dist;full;no;safe;yes. If yes or safe, performs an aptitude safe-upgrade.,If full, performs an aptitude full-upgrade.,If dist, performs an apt-get dist-upgrade.,Note: This does not upgrade a specific package, use state=latest for that.,Note: Since 2.4, apt-get is used as a fall-back if aptitude is not present.
state: latest # not required. choices: absent;build-dep;latest;present. Indicates the desired package state. C(latest) ensures that the latest version is installed. C(build-dep) ensures the package build dependencies are installed. state: latest # not required. choices: absent;build-dep;latest;present. Indicates the desired package state. C(latest) ensures that the latest version is installed. C(build-dep) ensures the package build dependencies are installed.
become: yes become: yes
when: debian.stdout when: debian.stdout
register: upgrade register: upgrade
- name: Reboot updates to apply - name: Reboot updates to apply
reboot: reboot:
reboot_timeout: 3600 reboot_timeout: 3600
when: upgrade.changed and "linux" in upgrade.packages and not debian.stdout when: upgrade.changed and "linux" in upgrade.packages and not debian.stdout
become: yes become: yes
@ -76,15 +73,16 @@
become_user: "{{user.name}}" become_user: "{{user.name}}"
when: sssd_configure == true when: sssd_configure == true
- name: set sudoers right
lineinfile: lineinfile:
dest: '/etc/sudoers.d/{{user.name}}' dest: "/etc/sudoers.d/{{user.name}}"
regexp: '{{ item.regexp }}' regexp: "{{ item.regexp }}"
line: '{{ item.line }}' line: "{{ item.line }}"
state: 'present' state: "present"
create: True create: True
owner: 'root' owner: "root"
group: 'root' group: "root"
mode: '0440' mode: "0440"
validate: 'visudo -cf "%s"' validate: 'visudo -cf "%s"'
with_items: with_items:
- regexp: '^{{user.name}}\s' - regexp: '^{{user.name}}\s'
@ -98,7 +96,6 @@
state: "present" state: "present"
validate: 'visudo -cf "%s"' validate: 'visudo -cf "%s"'
- name: Set authorized key taken from file - name: Set authorized key taken from file
authorized_key: authorized_key:
user: "{{user.name}}" user: "{{user.name}}"