chore(ansible): standardize distribution checks and quote consistency
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
- import_tasks: tasks/debian-general/hostname.yml
|
||||
- import_tasks: tasks/debian-general/hosts-file.yml
|
||||
- import_tasks: tasks/debian-general/repositories-bullseye.yml
|
||||
when: ansible_facts.lsb.codename == "bullseye"
|
||||
when: ansible_facts["lsb"]["codename"] == "bullseye"
|
||||
- import_tasks: tasks/debian-general/repositories-bookworm.yml
|
||||
when: ansible_facts.lsb.codename == "bookworm"
|
||||
when: ansible_facts["lsb"]["codename"] == "bookworm"
|
||||
- import_tasks: tasks/debian-general/repositories-trixie.yml
|
||||
when: ansible_facts.lsb.codename == "trixie"
|
||||
when: ansible_facts["lsb"]["codename"] == "trixie"
|
||||
- import_tasks: tasks/debian-to-pve/repositories.yml
|
||||
- import_tasks: tasks/debian-to-pve/pve-server.yml
|
||||
|
||||
4
motd.yml
4
motd.yml
@@ -6,7 +6,7 @@
|
||||
ansible.builtin.include_vars:
|
||||
file: figlet.yml
|
||||
- import_tasks: tasks/debian-general/update.yml
|
||||
when: ansible_facts['distribution'] == 'Debian'
|
||||
when: ansible_facts["distribution"] == "Debian"
|
||||
- import_tasks: tasks/rhel-general/update.yml
|
||||
when: ansible_facts['distribution'] == 'RedHat'
|
||||
when: ansible_facts["distribution"] == "RedHat"
|
||||
- import_tasks: tasks/general/figlet.yml
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
become: true
|
||||
tasks:
|
||||
- import_tasks: tasks/debian-general/git.yml
|
||||
when: ansible_facts["os_family"] == "Debian"
|
||||
when: ansible_facts["distribution"] == "Debian"
|
||||
- import_tasks: tasks/debian-general/hostname-package.yml
|
||||
when: ansible_facts["os_family"] == "Debian"
|
||||
when: ansible_facts["distribution"] == "Debian"
|
||||
- import_tasks: tasks/rhel-general/git.yml
|
||||
when: ansible_facts["os_family"] == "RedHat"
|
||||
when: ansible_facts["distribution"] == "RedHat"
|
||||
- import_tasks: tasks/rhel-general/hostname-package.yml
|
||||
when: ansible_facts["os_family"] == "RedHat"
|
||||
when: ansible_facts["distribution"] == "RedHat"
|
||||
- import_tasks: tasks/general/personal-linux-config.yml
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
tasks:
|
||||
- import_tasks: tasks/general/sshbanner-bjphoster.yml
|
||||
- import_tasks: tasks/debian-general/sshbanner.yml
|
||||
when: ansible_facts["os_family"] == "Debian"
|
||||
when: ansible_facts["distribution"] == "Debian"
|
||||
- import_tasks: tasks/rhel-general/sshbanner.yml
|
||||
when: ansible_facts["os_family"] == "RedHat"
|
||||
when: ansible_facts["distribution"] == "RedHat"
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
tasks:
|
||||
- import_tasks: tasks/general/sshd-config.yml
|
||||
- import_tasks: tasks/debian-general/restart-ssh-service.yml
|
||||
when: ansible_facts["os_family"] == "Debian"
|
||||
when: ansible_facts["distribution"] == "Debian"
|
||||
- import_tasks: tasks/rhel-general/restart-ssh-service.yml
|
||||
when: ansible_facts["os_family"] == "RedHat"
|
||||
when: ansible_facts["distribution"] == "RedHat"
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
name:
|
||||
- docker-compose-plugin
|
||||
state: latest
|
||||
when: ansible_facts.os_family == "Debian"
|
||||
when: ansible_facts["distribution"] == "Debian"
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
- curl
|
||||
- gnupg
|
||||
- lsb-release
|
||||
when: ansible_facts.os_family == "Debian"
|
||||
when: ansible_facts["distribution"] == "Debian"
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
name:
|
||||
- docker-ce
|
||||
state: latest
|
||||
when: ansible_facts.os_family == "Debian"
|
||||
when: ansible_facts["distribution"] == "Debian"
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when: ansible_facts.distribution == 'Debian'
|
||||
when: ansible_facts["distribution"] == "Debian"
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
- import_tasks: tasks/debian-general/repositories-bookworm.yml
|
||||
when: ansible_facts["lsb"]["codename"] == "bookworm"
|
||||
- import_tasks: tasks/debian-general/repositories-trixie.yml
|
||||
when: ansible_facts.lsb.codename == "trixie"
|
||||
when: ansible_facts["lsb"]["codename"] == "trixie"
|
||||
- import_tasks: tasks/debian-general/upgrade.yml
|
||||
|
||||
Reference in New Issue
Block a user