diff --git a/tasks/apt.yml b/tasks/apt.yml index 336aced23e427bc26463742dbff01f44b96da5c5..099a61e402a315bcf437ac8879542b55b62663ae 100644 --- a/tasks/apt.yml +++ b/tasks/apt.yml @@ -27,7 +27,7 @@ - name: APT | install base & os packages ansible.builtin.apt: cache_valid_time: 3600 - force_apt_get: yes + force_apt_get: true pkg: "{{ lookup('flattened', base_pkg, os_pkg) }}" state: present update_cache: true @@ -56,7 +56,7 @@ when: inventory_hostname in groups.station ansible.builtin.apt: cache_valid_time: 3600 - force_apt_get: yes + force_apt_get: true pkg: "{{ lookup('flattened', station_pkg, station_os_pkg, station_wm_pkg) }}" state: present update_cache: true @@ -65,7 +65,7 @@ when: inventory_hostname in groups.workstat ansible.builtin.apt: cache_valid_time: 3600 - force_apt_get: yes + force_apt_get: true pkg: "{{ lookup('flattened', workstat_pkg, workstat_os_pkg, workstat_wm_pkg) }}" state: present update_cache: true @@ -94,14 +94,14 @@ - name: APT | upgrade all packages to the latest version ansible.builtin.apt: - force_apt_get: yes + force_apt_get: true upgrade: safe - name: APT | remove useless packages from the cache ansible.builtin.apt: - force_apt_get: yes - autoclean: yes - autoremove: yes + force_apt_get: true + autoclean: true + autoremove: true - name: APT | check for restarts ansible.builtin.stat: path={{ item }} @@ -109,7 +109,7 @@ loop: - /var/run/firefox-restart-required - /var/run/reboot-required - no_log: yes + no_log: true - name: APT | restart message ansible.builtin.debug: diff --git a/tasks/become_user_cfg.yml b/tasks/become_user_cfg.yml index 960cfceb4396e140d13fd6f9cebabc1fe7aa0eb2..48b4f7d8067ddd1caed02ee3dcaa549b60c8891b 100644 --- a/tasks/become_user_cfg.yml +++ b/tasks/become_user_cfg.yml @@ -1,5 +1,5 @@ --- -# When 1st user is root, set it as "remote_user" and remove all "become: yes" +# When 1st user is root, set it as "remote_user" and remove all "become: true" - hosts: "{{ host_list }}" become_method: sudo remote_user: "{{ my_user }}" @@ -7,19 +7,19 @@ tasks: - name: SUDO | Group sudo presence - become: yes + become: true ansible.builtin.group: name: sudo state: present - name: SUDO | Group wheel absence - become: yes + become: true ansible.builtin.group: name: wheel state: absent - name: SUDO | User presence (with groups) - become: yes + become: true ansible.builtin.user: name: "{{ my_user }}" state: present @@ -27,11 +27,11 @@ append: true - name: SUDO | Reset ansible connection to apply group update - become: yes + become: true meta: reset_connection - name: "SSH | Local public key is present for {{ my_user }}" - become: yes + become: true ansible.builtin.authorized_key: comment: "Managed by Ansible" key: https://gitlab.com/free_zed.keys @@ -39,13 +39,13 @@ user: "{{ my_user }}" - name: SSH | Disallow SSHÂ password authentication for root - become: yes + become: true copy: src: files/sshd_config dest: /etc/ssh/sshd_config - name: "SSH | Local public key is present for root" - become: yes + become: true ansible.builtin.authorized_key: comment: "Managed by Ansible" key: https://gitlab.com/free_zed.keys @@ -53,7 +53,7 @@ user: root - name: SUDO | Remove no password directive - become: yes + become: true ansible.builtin.lineinfile: path: /etc/sudoers state: absent