Skip to content

Commit

Permalink
DLPX-92522 appliance-build changes for LTS upgrade to 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
palash-gandhi committed Oct 24, 2024
1 parent 89f45da commit 2f20f8c
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 31 deletions.
100 changes: 100 additions & 0 deletions .ansible-lint-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# This file contains ignores rule violations for ansible-lint
bootstrap/playbook.yml name[play]
bootstrap/roles/appliance-build.bootstrap role-name
bootstrap/roles/appliance-build.bootstrap/tasks/main.yml fqcn[action-core]
bootstrap/roles/appliance-build.bootstrap/tasks/main.yml fqcn[action]
bootstrap/roles/appliance-build.bootstrap/tasks/main.yml name[missing]
bootstrap/roles/appliance-build.bootstrap/tasks/main.yml yaml[truthy]
live-build/misc/ansible-roles/appliance-build.buildserver-internal/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.buildserver-internal/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml command-instead-of-module
live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml fqcn[action]
live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml no-changed-when
live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml risky-file-permissions
live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml yaml[truthy]
live-build/misc/ansible-roles/appliance-build.dct-common/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.dct-common/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.delphix-autofs/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.delphix-autofs/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.delphix-autofs/tasks/main.yml yaml[octal-values]
live-build/misc/ansible-roles/appliance-build.delphix-ldap/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.delphix-ldap/tasks/main.yml literal-compare
live-build/misc/ansible-roles/appliance-build.delphix-ldap/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.delphix-ldap/tasks/main.yml yaml[octal-values]
live-build/misc/ansible-roles/appliance-build.delphix-ldap/tasks/main.yml yaml[truthy]
live-build/misc/ansible-roles/appliance-build.devops-development/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.devops-development/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.devops-development/tasks/main.yml yaml[truthy]
live-build/misc/ansible-roles/appliance-build.masking-common/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.masking-common/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.masking-development/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.masking-development/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.masking-development/tasks/main.yml risky-file-permissions
live-build/misc/ansible-roles/appliance-build.masking-development/tasks/main.yml yaml[truthy]
live-build/misc/ansible-roles/appliance-build.minimal-common/tasks/main.yml command-instead-of-shell
live-build/misc/ansible-roles/appliance-build.minimal-common/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.minimal-common/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.minimal-common/tasks/main.yml no-changed-when
live-build/misc/ansible-roles/appliance-build.minimal-common/tasks/main.yml yaml[octal-values]
live-build/misc/ansible-roles/appliance-build.minimal-common/tasks/main.yml yaml[truthy]
live-build/misc/ansible-roles/appliance-build.minimal-development/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.minimal-development/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.minimal-development/tasks/main.yml yaml[octal-values]
live-build/misc/ansible-roles/appliance-build.minimal-internal/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.minimal-internal/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.minimal-internal/tasks/main.yml yaml[octal-values]
live-build/misc/ansible-roles/appliance-build.qa-internal/handlers/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.qa-internal/handlers/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.qa-internal/handlers/main.yml no-changed-when
live-build/misc/ansible-roles/appliance-build.qa-internal/handlers/main.yml yaml[new-line-at-end-of-file]
live-build/misc/ansible-roles/appliance-build.qa-internal/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.qa-internal/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.qa-internal/tasks/main.yml yaml[octal-values]
live-build/misc/ansible-roles/appliance-build.recovery-environment/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.recovery-environment/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.recovery-environment/tasks/main.yml yaml[empty-lines]
live-build/misc/ansible-roles/appliance-build.unittest-internal/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.unittest-internal/tasks/main.yml fqcn[action]
live-build/misc/ansible-roles/appliance-build.unittest-internal/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.virtualization-common/tasks/main.yml command-instead-of-module
live-build/misc/ansible-roles/appliance-build.virtualization-common/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.virtualization-common/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.virtualization-common/tasks/main.yml no-changed-when
live-build/misc/ansible-roles/appliance-build.virtualization-common/tasks/main.yml risky-file-permissions
live-build/misc/ansible-roles/appliance-build.virtualization-common/tasks/main.yml yaml[truthy]
live-build/misc/ansible-roles/appliance-build.virtualization-development/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.virtualization-development/tasks/main.yml fqcn[action]
live-build/misc/ansible-roles/appliance-build.virtualization-development/tasks/main.yml key-order[task]
live-build/misc/ansible-roles/appliance-build.virtualization-development/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.virtualization-development/tasks/main.yml risky-file-permissions
live-build/misc/ansible-roles/appliance-build.virtualization-development/tasks/main.yml yaml[truthy]
live-build/misc/ansible-roles/appliance-build.zfsonlinux-development/tasks/main.yml fqcn[action-core]
live-build/misc/ansible-roles/appliance-build.zfsonlinux-development/tasks/main.yml name[missing]
live-build/misc/ansible-roles/appliance-build.zfsonlinux-development/tasks/main.yml risky-file-permissions
live-build/misc/ansible-roles/appliance-build.zfsonlinux-development/tasks/main.yml yaml[truthy]
live-build/variants/external-dct/ansible/playbook.yml name[play]
live-build/variants/external-dct/ansible/playbook.yml yaml[truthy]
live-build/variants/external-standard/ansible/playbook.yml name[play]
live-build/variants/external-standard/ansible/playbook.yml yaml[truthy]
live-build/variants/internal-buildserver/ansible/playbook.yml name[play]
live-build/variants/internal-buildserver/ansible/playbook.yml yaml[truthy]
live-build/variants/internal-dcenter/ansible/playbook.yml name[play]
live-build/variants/internal-dcenter/ansible/playbook.yml yaml[truthy]
live-build/variants/internal-dct/ansible/playbook.yml name[play]
live-build/variants/internal-dct/ansible/playbook.yml yaml[truthy]
live-build/variants/internal-dev/ansible/playbook.yml name[play]
live-build/variants/internal-dev/ansible/playbook.yml yaml[truthy]
live-build/variants/internal-minimal/ansible/playbook.yml name[play]
live-build/variants/internal-minimal/ansible/playbook.yml yaml[truthy]
live-build/variants/internal-package-mirror/ansible/playbook.yml name[play]
live-build/variants/internal-package-mirror/ansible/playbook.yml yaml[truthy]
live-build/variants/internal-qa/ansible/playbook.yml name[play]
live-build/variants/internal-qa/ansible/playbook.yml yaml[truthy]
live-build/variants/internal-unittest/ansible/playbook.yml name[play]
live-build/variants/internal-unittest/ansible/playbook.yml yaml[truthy]
live-build/misc/ansible-roles/appliance-build.dcenter/tasks/main.yml syntax-check[unknown-module]
live-build/misc/ansible-roles/appliance-build.virtualization-development/tasks/main.yml syntax-check[unknown-module]
live-build/misc/ansible-roles/appliance-build.unittest-internal/tasks/main.yml syntax-check[unknown-module]
bootstrap/roles/appliance-build.bootstrap/tasks/main.yml syntax-check[unknown-module]
16 changes: 0 additions & 16 deletions .github/scripts/install-ansible-lint.sh

This file was deleted.

14 changes: 9 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ on: [push, pull_request]

jobs:
check-ansible:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v1
- run: sudo ./.github/scripts/install-gradle.sh
- run: sudo -E ./.github/scripts/install-ansible-lint.sh
- run: /opt/gradle-5.1/bin/gradle ansibleCheck
- uses: actions/checkout@v4
- name: Run ansible-lint
uses: ansible/ansible-lint@main
with:
args: ""
setup_python: "true"
working_directory: ""
requirements_file: ""
check-shellcheck:
runs-on: ubuntu-20.04
steps:
Expand Down
27 changes: 24 additions & 3 deletions bootstrap/roles/appliance-build.bootstrap/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
name:
- ansible
- aptly
- awscli
- bc
- coreutils
- devscripts
- docker.io
- equivs
- gdisk
- git
Expand All @@ -36,15 +36,36 @@
- livecd-rootfs
- make
- man
- openjdk-8-jre-headless
- openjdk-8-jdk
- pigz
- qemu
- qemu-system
- rename
- shellcheck
- vim
- zfsutils-linux
state: present

- systemd:

Check warning on line 48 in bootstrap/roles/appliance-build.bootstrap/tasks/main.yml

View workflow job for this annotation

GitHub Actions / check-ansible

fqcn[action-core]

Use FQCN for builtin module actions (systemd).

Check warning on line 48 in bootstrap/roles/appliance-build.bootstrap/tasks/main.yml

View workflow job for this annotation

GitHub Actions / check-ansible

name[missing]

All tasks should be named.

Check warning on line 48 in bootstrap/roles/appliance-build.bootstrap/tasks/main.yml

View workflow job for this annotation

GitHub Actions / check-ansible

fqcn[action-core]

Use FQCN for builtin module actions (systemd).

Check warning on line 48 in bootstrap/roles/appliance-build.bootstrap/tasks/main.yml

View workflow job for this annotation

GitHub Actions / check-ansible

name[missing]

All tasks should be named.
name: unattended-upgrades

Check failure on line 49 in bootstrap/roles/appliance-build.bootstrap/tasks/main.yml

View workflow job for this annotation

GitHub Actions / check-ansible

yaml[indentation]

Wrong indentation: expected 4 but found 6

Check failure on line 49 in bootstrap/roles/appliance-build.bootstrap/tasks/main.yml

View workflow job for this annotation

GitHub Actions / check-ansible

yaml[indentation]

Wrong indentation: expected 4 but found 6
state: stopped
register: result_systemd_stop
failed_when: "result_systemd_stop is failed and 'Could not find the requested service' not in result_systemd_stop.msg"

- apt:

Check warning on line 54 in bootstrap/roles/appliance-build.bootstrap/tasks/main.yml

View workflow job for this annotation

GitHub Actions / check-ansible

fqcn[action-core]

Use FQCN for builtin module actions (apt).

Check warning on line 54 in bootstrap/roles/appliance-build.bootstrap/tasks/main.yml

View workflow job for this annotation

GitHub Actions / check-ansible

fqcn[action-core]

Use FQCN for builtin module actions (apt).
name:
- unattended-upgrades
state: absent
purge: true

- snap:
name: aws-cli
classic: yes

- modprobe:
name: zfs
state: present

- user:
name: delphix
groups: docker
append: true
8 changes: 1 addition & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,7 @@ task shellCheck(type: Exec) {
commandLine(["shellcheck", "--exclude=SC1090,SC1091"] + shellScripts.getFiles())
}

task ansibleCheck(type: Exec) {
def ansibleFiles = fileTree("bootstrap").include("**/playbook.yml") +
fileTree("live-build/variants").include("**/playbook.yml")
commandLine(["ansible-lint", "--exclude=SC1090,SC1091"] + ansibleFiles.getFiles())
}

tasks.check.dependsOn shellCheck, shfmtCheck, ansibleCheck
tasks.check.dependsOn shellCheck, shfmtCheck

task format() {
dependsOn shfmt
Expand Down

0 comments on commit 2f20f8c

Please sign in to comment.