From f6cfbcbb75673ecd734265671ab36b2f29e11f8b Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 16:44:51 -0500 Subject: [PATCH 01/12] Tentatively update .travis.yml for syntax checks w/ recent Ubuntu/Python/Ansible --- .travis.yml | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index 83c627442..3b09d8e3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,9 @@ ---- language: python -python: "2.7" - -# Use the new container infrastructure -dist: trusty -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Create ansible.cfg with correct roles_path and local_tmp - - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" - +python: "3.8" +dist: focal +#install: +## Create ansible.cfg with correct roles_path and local_tmp +#- "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -#notifications: -# webhooks: https://galaxy.ansible.com/api/v1/notifications/ +- /opt/iiab/iiab/scripts/ansible +- ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 2f11f26ddda08169465425f1f762ea65a65b0c48 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 16:50:44 -0500 Subject: [PATCH 02/12] Preserve more of @arky legacy/hints in .travis.yml --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3b09d8e3c..2eb183b9d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,14 @@ language: python python: "3.8" dist: focal +#addons: +# apt: +# packages: +# - python-pip #install: -## Create ansible.cfg with correct roles_path and local_tmp -#- "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" +# - pip install ansible +# # Create ansible.cfg with correct roles_path and local_tmp +# - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" script: - /opt/iiab/iiab/scripts/ansible - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 7df1f6ae4070b1accd08a62a1bdd373ffc16b8be Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 16:57:40 -0500 Subject: [PATCH 03/12] .travis.yml: /opt/iiab/iiab/scripts/ansible -> scripts/ansible --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2eb183b9d..8e1456b36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,10 @@ dist: focal # apt: # packages: # - python-pip -#install: +install: + - scripts/ansible # Install latest Ansible & ~4 Ansible Collections (collections.yml) # - pip install ansible # # Create ansible.cfg with correct roles_path and local_tmp # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" script: -- /opt/iiab/iiab/scripts/ansible -- ansible-playbook tests/test.yml -i tests/inventory --syntax-check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 06160fb45d14a30b7e723f5992118553be0d0853 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 17:12:27 -0500 Subject: [PATCH 04/12] Update .travis.yml --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e1456b36..fce675a18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,9 @@ dist: focal # packages: # - python-pip install: - - scripts/ansible # Install latest Ansible & ~4 Ansible Collections (collections.yml) -# - pip install ansible +# - scripts/ansible # Fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) +# - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections + - pip install ansible-base # Let's avoid all Ansible Collections for now (for Ansible syntax check!) # # Create ansible.cfg with correct roles_path and local_tmp # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" script: From 1f0c409ecb704a6ea86a4db8b380eab30741c27a Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 17:19:13 -0500 Subject: [PATCH 05/12] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fce675a18..0acf5e2d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ install: # - scripts/ansible # Fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections - pip install ansible-base # Let's avoid all Ansible Collections for now (for Ansible syntax check!) -# # Create ansible.cfg with correct roles_path and local_tmp -# - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" + - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp + - cat ansible.cfg # TEMP TESTING script: - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 7082326ca3ce3a630efd67d59eead044e9785bfb Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 17:25:14 -0500 Subject: [PATCH 06/12] Update .travis.yml --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0acf5e2d4..ca4504492 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,8 @@ install: # - scripts/ansible # Fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections - pip install ansible-base # Let's avoid all Ansible Collections for now (for Ansible syntax check!) - - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp - - cat ansible.cfg # TEMP TESTING + - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg +# - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp +# - cat ansible.cfg # UNCOMMENT TO VERIFY script: - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 2fc9f5c4fa4783815b587218d5dbca202cbf4c37 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 17:37:40 -0500 Subject: [PATCH 07/12] Update .travis.yml --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ca4504492..5fec256f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,10 @@ dist: focal # packages: # - python-pip install: -# - scripts/ansible # Fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) +# - scripts/ansible # See #2105: fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) due to Travis VM's disk layout/perms being different # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections - pip install ansible-base # Let's avoid all Ansible Collections for now (for Ansible syntax check!) + - ansible-galaxy collection install -r collections.yml - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp # - cat ansible.cfg # UNCOMMENT TO VERIFY From 2490551c0632af82e8db9529b24177cd769cf52f Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 17:48:17 -0500 Subject: [PATCH 08/12] Clarify new/working .travis.yml --- .travis.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5fec256f3..d1f7a89df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,20 @@ language: python python: "3.8" dist: focal + #addons: # apt: # packages: # - python-pip + install: # - scripts/ansible # See #2105: fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) due to Travis VM's disk layout/perms being different # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections - - pip install ansible-base # Let's avoid all Ansible Collections for now (for Ansible syntax check!) - - ansible-galaxy collection install -r collections.yml - - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg + - pip install ansible-base # Install latest ansible-base 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible + - ansible-galaxy collection install -r collections.yml # Install ~4 Ansible Collections + - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg, appending to https://github.com/iiab/iiab/blob/master/ansible.cfg # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp -# - cat ansible.cfg # UNCOMMENT TO VERIFY +# - cat ansible.cfg # UNCOMMENT TO VERIFY! + script: - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From 601b50fc34640f117f3bee2fdaab8c842bd50af9 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 18:57:12 -0500 Subject: [PATCH 09/12] Update .travis.yml --- .travis.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index d1f7a89df..5549301be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,19 @@ language: python -python: "3.8" +python: 3.8 # "3.8" also works dist: focal -#addons: -# apt: -# packages: -# - python-pip +addons: + apt: + sources: + - sourceline: ppa:ansible/ansible + packages: + - ansible-base # Install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible +# - python-pip install: # - scripts/ansible # See #2105: fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) due to Travis VM's disk layout/perms being different # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections - - pip install ansible-base # Install latest ansible-base 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible +# - pip install ansible-base # Install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible - ansible-galaxy collection install -r collections.yml # Install ~4 Ansible Collections - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg, appending to https://github.com/iiab/iiab/blob/master/ansible.cfg # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp From 69d2dba12919a8a095e95773ce04835028b02752 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 19:12:46 -0500 Subject: [PATCH 10/12] Update .travis.yml --- .travis.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5549301be..3122ecc02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,13 +7,21 @@ addons: sources: - sourceline: ppa:ansible/ansible packages: +# - python-pip # @arky had used this starting in 2018 - ansible-base # Install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible -# - python-pip +# - python3-pymysql # These 7-or-8 packages are not needed during this very rapid --syntax-check +# - python3-psycopg2 +# - python3-passlib +# - python3-pip +# - python3-setuptools + - python3-packaging # To avoid warning "packaging Python module unavailable; unable to validate collection..." +# - python3-venv +# - virtualenv install: # - scripts/ansible # See #2105: fails to install latest Ansible (& ~4 Ansible Collections from collections.yml) due to Travis VM's disk layout/perms being different # - pip install ansible # SLOW/OVERWEIGHT: installs Ansible 3.0.0+ with ~80 Ansible Collections -# - pip install ansible-base # Install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible +# - pip install ansible-base # ALSO WORKS e.g. if the above addons: / apt: section is commented out. To install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible - ansible-galaxy collection install -r collections.yml # Install ~4 Ansible Collections - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg, appending to https://github.com/iiab/iiab/blob/master/ansible.cfg # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp From 95e6e72537887a561bd2437cf010a05017518e98 Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 19:23:34 -0500 Subject: [PATCH 11/12] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3122ecc02..3f78f41ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ install: - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg, appending to https://github.com/iiab/iiab/blob/master/ansible.cfg # - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp # - cat ansible.cfg # UNCOMMENT TO VERIFY! + - apt -a list ansible-base # VERIFY ansible-base VERSIONS OFFERED BY apt script: - ansible-playbook tests/test.yml -i tests/inventory --syntax-check From d877bc7d4ff84f315e82673b4479944abedd3a0d Mon Sep 17 00:00:00 2001 From: A Holt Date: Wed, 24 Feb 2021 20:28:57 -0500 Subject: [PATCH 12/12] .travis.yml: new error when ansible.cfg contains '[defaults]' twice --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3f78f41ba..119893b55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ install: # - pip install ansible-base # ALSO WORKS e.g. if the above addons: / apt: section is commented out. To install latest ansible-base e.g. 2.10.6+, similar to https://github.com/iiab/iiab/blob/master/scripts/ansible - ansible-galaxy collection install -r collections.yml # Install ~4 Ansible Collections - "{ echo 'roles_path = ./roles/'; } >> ansible.cfg" # Add correct roles_path to ansible.cfg, appending to https://github.com/iiab/iiab/blob/master/ansible.cfg -# - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # Create ansible.cfg with correct roles_path and local_tmp +# - "{ echo '[defaults]'; echo 'roles_path = ./roles/'; } >> ansible.cfg" # 2021-02-24: suddenly no longer works, with the newer ansible-base install methods above (error arises due to '[defaults]' appearing twice) # - cat ansible.cfg # UNCOMMENT TO VERIFY! - apt -a list ansible-base # VERIFY ansible-base VERSIONS OFFERED BY apt