From 4ab6686a98c12b9b969e795d77d4f5ab4b040d32 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Thu, 25 May 2023 16:41:59 -0400 Subject: [PATCH] ansible: Add physical hosts with minimal common configuration Change-Id: I32e94782853288021303fb9fd9fbe48afd1c96ee --- automation/ansible/group_vars/host.yml | 2 ++ automation/ansible/group_vars/node.yml | 20 +++++++++++++++++++ automation/ansible/hosts | 7 ++++--- automation/ansible/hosts.yml | 1 + .../roles/common/tasks/setup-Debian.yml | 6 +++++- .../ansible/roles/common/vars/Debian.yml | 16 --------------- 6 files changed, 32 insertions(+), 20 deletions(-) create mode 100644 automation/ansible/group_vars/host.yml diff --git a/automation/ansible/group_vars/host.yml b/automation/ansible/group_vars/host.yml new file mode 100644 index 0000000..02a0ca6 --- /dev/null +++ b/automation/ansible/group_vars/host.yml @@ -0,0 +1,2 @@ +--- +jenkins_user: true diff --git a/automation/ansible/group_vars/node.yml b/automation/ansible/group_vars/node.yml index 02a0ca6..3a17f75 100644 --- a/automation/ansible/group_vars/node.yml +++ b/automation/ansible/group_vars/node.yml @@ -1,2 +1,22 @@ --- jenkins_user: true +packages_Debian: + - autoconf + - automake + - bison + - build-essential + - clang + - clang-tools + - cloc + - default-jdk-headless + - flex + - gettext + - git + - libssl-dev + - libtap-harness-archive-perl + - libtool-bin + - lzop + - pbzip2 + - sudo + - vim + - virtualenv diff --git a/automation/ansible/hosts b/automation/ansible/hosts index f148b44..d8dec19 100644 --- a/automation/ansible/hosts +++ b/automation/ansible/hosts @@ -1,13 +1,14 @@ localhost ansible_connection=local ansible_python_interpreter=python3 [hosts] -#cloud01.internal.efficios.com +cloud01.internal.efficios.com cloud02.internal.efficios.com cloud03.internal.efficios.com cloud04.internal.efficios.com cloud05.internal.efficios.com -#cloud06.internal.efficios.com -#cloud07.internal.efficios.com +cloud06.internal.efficios.com +cloud07.internal.efficios.com +# This host is used for tests via lava and is running ephemereal installs only #cloud08.internal.efficios.com ci-host-win11-arm64-01.internal.efficios.com diff --git a/automation/ansible/hosts.yml b/automation/ansible/hosts.yml index f38a87e..c02b6df 100644 --- a/automation/ansible/hosts.yml +++ b/automation/ansible/hosts.yml @@ -1,2 +1,3 @@ - hosts: hosts roles: + - common diff --git a/automation/ansible/roles/common/tasks/setup-Debian.yml b/automation/ansible/roles/common/tasks/setup-Debian.yml index 0f70202..54a7a4f 100644 --- a/automation/ansible/roles/common/tasks/setup-Debian.yml +++ b/automation/ansible/roles/common/tasks/setup-Debian.yml @@ -20,4 +20,8 @@ apt: update_cache=yes cache_valid_time=86400 - name: Ensure common packages are installed. - apt: "name={{ common_packages }} state=present" + apt: "name={{ common_packages + packages_Debian|default([]) }} state=present" + +- name: Debug common packages + debug: + msg: "{{ common_packages + packages_Debian|default([]) }}" diff --git a/automation/ansible/roles/common/vars/Debian.yml b/automation/ansible/roles/common/vars/Debian.yml index 475b754..8b688b2 100644 --- a/automation/ansible/roles/common/vars/Debian.yml +++ b/automation/ansible/roles/common/vars/Debian.yml @@ -1,29 +1,13 @@ --- common_packages: - - autoconf - - automake - - bison - - build-essential - - clang - - clang-tools - - cloc - curl - - default-jdk-headless - emacs-nox - - flex - - gettext - git - htop - jq - - libssl-dev - - libtap-harness-archive-perl - - libtool-bin - - lzop - openssh-server - - pbzip2 - psmisc - rsync - sudo - tree - vim - - virtualenv -- 2.34.1