From 140a0a582f10caf68fdb0ff9af45a4fee6b14923 Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: May 09 2022 12:50:56 +0000 Subject: Update the config-check and config-update job This change fixes the config jobs to work with the latest release of sf. --- diff --git a/playbooks/config/check.yaml b/playbooks/config/check.yaml index 7996935..53e983d 100644 --- a/playbooks/config/check.yaml +++ b/playbooks/config/check.yaml @@ -92,7 +92,7 @@ - name: Check nodepool dhall configuration shell: | - for dhall_conf in $(ls nodepool/*.dhall 2> /dev/null); do + for dhall_conf in $(ls nodepool/static_config/*.dhall 2> /dev/null); do echo ${dhall_conf} dhall-to-yaml --file ${dhall_conf} --output build/$(basename ${dhall_conf} .dhall).yaml || exit 1 done diff --git a/playbooks/config/config-update.yaml b/playbooks/config/config-update.yaml new file mode 100644 index 0000000..e083511 --- /dev/null +++ b/playbooks/config/config-update.yaml @@ -0,0 +1,6 @@ +# This file is managed by ansible, do not edit directly +--- +- hosts: localhost + tasks: + - include_tasks: update_local.yaml + - include_tasks: update_tenant.yaml diff --git a/playbooks/config/update.yaml b/playbooks/config/update.yaml deleted file mode 100644 index e083511..0000000 --- a/playbooks/config/update.yaml +++ /dev/null @@ -1,6 +0,0 @@ -# This file is managed by ansible, do not edit directly ---- -- hosts: localhost - tasks: - - include_tasks: update_local.yaml - - include_tasks: update_tenant.yaml diff --git a/playbooks/config/update_local.yaml b/playbooks/config/update_local.yaml index f0712bc..a334e85 100644 --- a/playbooks/config/update_local.yaml +++ b/playbooks/config/update_local.yaml @@ -9,7 +9,7 @@ copy: content: "{{ site_install_server.ssh_private_key }}" dest: "{{ ssh_private_key_tmp.path }}" - mode: 0600 + mode: '0600' - name: Add zuul ssh key command: "ssh-add {{ ssh_private_key_tmp.path }}" @@ -23,4 +23,4 @@ key: "{{ site_install_server.ssh_known_hosts }}" - name: run config update - command: "ssh root@{{ site_install_server.fqdn }} sf_configrepo_update {{ (zuul | zuul_legacy_vars)['ZUUL_NEWREV'] }}" + command: "ssh root@{{ site_install_server.fqdn }} config_update {{ (zuul | zuul_legacy_vars)['ZUUL_NEWREV'] }}" diff --git a/playbooks/config/update_tenant.yaml b/playbooks/config/update_tenant.yaml index 1298a4b..9d8c51f 100644 --- a/playbooks/config/update_tenant.yaml +++ b/playbooks/config/update_tenant.yaml @@ -22,7 +22,7 @@ copy: content: "{{ site_tenant_update.ssh_private_key }}" dest: "{{ ssh_private_key_tmp.path }}" - mode: 0600 + mode: '0600' - name: Add zuul ssh key command: "ssh-add {{ ssh_private_key_tmp.path }}" @@ -36,5 +36,5 @@ key: "{{ site_tenant_update.ssh_known_hosts }}" - name: Run tenant_update - command: "ssh root@{{ site_tenant_update.fqdn }} sf_tenant_update" + command: "ssh root@{{ site_tenant_update.fqdn }} tenant_update" when: git_log_resources.stdout == git_log.stdout diff --git a/zuul.d/_jobs-base.yaml b/zuul.d/_jobs-base.yaml index c8817e1..348b927 100644 --- a/zuul.d/_jobs-base.yaml +++ b/zuul.d/_jobs-base.yaml @@ -51,7 +51,7 @@ allowed-projects: - fedora-project-config description: Deploy config repo update. - run: playbooks/config/update.yaml + run: playbooks/config/config-update.yaml secrets: - site_install_server - site_tenant_update