15 Commits

Author SHA1 Message Date
Larry Smith Jr
ca903442c8 Merge pull request #89 from msielicki/master
skip resizing swap filesystem
2022-05-30 09:01:51 -04:00
Larry Smith Jr
9e69c74f71 Merge pull request #91 from msielicki/fix_for_debian_testing
fix for debian testing / sid
2022-05-30 09:01:41 -04:00
Mariusz Sielicki
e9ff7e3faf fix for debian testing / sid 2022-05-27 18:23:17 +02:00
Mariusz Sielicki
84bfdf54ad skip resizing swap filesystem 2022-05-27 17:56:09 +02:00
Larry Smith Jr
376f2ce641 Merge pull request #86 from smutel/FixIssue85
Add variable rescan_scsi_command
2022-04-26 09:30:50 -04:00
Samuel Mutel
6e74c9714e enh: Add variable rescan_scsi_command 2022-04-11 13:49:46 +02:00
Larry Smith Jr
1f966d2ea1 Merge pull request #81 from christian7007/master 2022-01-13 08:39:41 -05:00
Christian González
71a3930e5b Fix syntax error on tasks/centos.yml 2022-01-13 10:50:13 +01:00
Larry Smith Jr
263c8d2b3f Merge pull request #73 from mnasiadka/mnasiadka/nvme_only
centos: Skip SCSI tasks on NVMe only hosts
2022-01-04 14:47:16 -05:00
Michal Nasiadka
0bfd390ace centos: Skip SCSI tasks on NVMe only hosts 2021-12-10 15:01:59 +01:00
Larry Smith Jr
71bc56d733 Merge pull request #70 from cityofships/optimize
CentOS: Optimise package installs
2021-11-22 15:12:41 -05:00
Larry Smith Jr
59ca2aae95 Pythonr reqs exported after #69 2021-11-22 14:29:40 -05:00
Piotr Parczewski
cb3a75c984 CentOS: Optimise package installs 2021-11-22 20:27:27 +01:00
Larry Smith Jr
fae4332de8 Merge pull request #69 from mrlesmithjr/dependabot/pip/ansible-4.2.0
Bump ansible from 2.9.7 to 4.2.0
2021-11-22 14:23:45 -05:00
dependabot[bot]
558cd7460e Bump ansible from 2.9.7 to 4.2.0
Bumps [ansible](https://github.com/ansible/ansible) from 2.9.7 to 4.2.0.
- [Release notes](https://github.com/ansible/ansible/releases)
- [Commits](https://github.com/ansible/ansible/commits)

---
updated-dependencies:
- dependency-name: ansible
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 19:15:36 +00:00
9 changed files with 95 additions and 35 deletions

47
poetry.lock generated
View File

@@ -1,6 +1,17 @@
[[package]]
name = "ansible"
version = "2.9.7"
version = "4.2.0"
description = "Radically simple IT automation"
category = "main"
optional = false
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
[package.dependencies]
ansible-core = ">=2.11.2,<2.12"
[[package]]
name = "ansible-core"
version = "2.11.6"
description = "Radically simple IT automation"
category = "main"
optional = false
@@ -9,10 +20,9 @@ python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
[package.dependencies]
cryptography = "*"
jinja2 = "*"
packaging = "*"
PyYAML = "*"
[package.extras]
azure = ["packaging", "requests", "xmltodict", "azure-cli-core (==2.0.35)", "azure-cli-nspkg (==3.0.2)", "azure-common (==1.1.11)", "azure-mgmt-authorization (==0.51.1)", "azure-mgmt-batch (==5.0.1)", "azure-mgmt-cdn (==3.0.0)", "azure-mgmt-compute (==4.4.0)", "azure-mgmt-containerinstance (==1.4.0)", "azure-mgmt-containerregistry (==2.0.0)", "azure-mgmt-containerservice (==4.4.0)", "azure-mgmt-dns (==2.1.0)", "azure-mgmt-keyvault (==1.1.0)", "azure-mgmt-marketplaceordering (==0.1.0)", "azure-mgmt-monitor (==0.5.2)", "azure-mgmt-network (==2.3.0)", "azure-mgmt-nspkg (==2.0.0)", "azure-mgmt-redis (==5.0.0)", "azure-mgmt-resource (==2.1.0)", "azure-mgmt-rdbms (==1.4.1)", "azure-mgmt-servicebus (==0.5.3)", "azure-mgmt-sql (==0.10.0)", "azure-mgmt-storage (==3.1.0)", "azure-mgmt-trafficmanager (==0.50.0)", "azure-mgmt-web (==0.41.0)", "azure-nspkg (==2.0.0)", "azure-storage (==0.35.1)", "msrest (==0.6.1)", "msrestazure (==0.5.0)", "azure-keyvault (==1.0.0a1)", "azure-graphrbac (==0.40.0)", "azure-mgmt-cosmosdb (==0.5.2)", "azure-mgmt-hdinsight (==0.1.0)", "azure-mgmt-devtestlabs (==3.0.0)", "azure-mgmt-loganalytics (==0.2.0)", "azure-mgmt-automation (==0.1.1)", "azure-mgmt-iothub (==0.7.0)"]
resolvelib = ">=0.5.3,<0.6.0"
[[package]]
name = "ansible-lint"
@@ -725,7 +735,7 @@ python-versions = "*"
name = "packaging"
version = "20.9"
description = "Core utilities for Python packages"
category = "dev"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
@@ -981,7 +991,7 @@ tests = ["pytest (>=3.2.1,!=3.3.0)", "hypothesis (>=3.27.0)"]
name = "pyparsing"
version = "3.0.6"
description = "Python parsing module"
category = "dev"
category = "main"
optional = false
python-versions = ">=3.6"
@@ -1103,6 +1113,20 @@ python-versions = "*"
[package.dependencies]
requests = ">=2.0.1,<3.0.0"
[[package]]
name = "resolvelib"
version = "0.5.5"
description = "Resolve abstract dependencies into concrete ones"
category = "main"
optional = false
python-versions = "*"
[package.extras]
examples = ["html5lib", "packaging", "pygraphviz", "requests"]
lint = ["black", "flake8"]
release = ["setl", "towncrier"]
test = ["commentjson", "packaging", "pytest"]
[[package]]
name = "ruamel.yaml"
version = "0.17.17"
@@ -1329,11 +1353,14 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes
[metadata]
lock-version = "1.1"
python-versions = "^3.10"
content-hash = "6d8357134e2cb5e33e45d985fe2e1ec1737af7f0da5d5008412f7dbe92b9cad7"
content-hash = "164ad99422f91270bcdf1c7f936dc56047169134e756cf2271aa6a10460f9e0f"
[metadata.files]
ansible = [
{file = "ansible-2.9.7.tar.gz", hash = "sha256:7222ce925536a25b2912364e13b03a3e21dbf2f96799ebff304f48509324de7b"},
{file = "ansible-4.2.0.tar.gz", hash = "sha256:737d819ffbd7a80c28795b4edd93e59ad21e6e6d53af0d19f57412814f9260d0"},
]
ansible-core = [
{file = "ansible-core-2.11.6.tar.gz", hash = "sha256:93d50283c7c5b476debf83dc089b3f679b939a8b9a7b5d628d28daafbb3d303a"},
]
ansible-lint = [
{file = "ansible-lint-4.2.0.tar.gz", hash = "sha256:eb925d8682d70563ccb80e2aca7b3edf84fb0b768cea3edc6846aac7abdc414a"},
@@ -1983,6 +2010,10 @@ requests-toolbelt = [
{file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"},
{file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"},
]
resolvelib = [
{file = "resolvelib-0.5.5-py2.py3-none-any.whl", hash = "sha256:b0143b9d074550a6c5163a0f587e49c49017434e3cdfe853941725f5455dd29c"},
{file = "resolvelib-0.5.5.tar.gz", hash = "sha256:123de56548c90df85137425a3f51eb93df89e2ba719aeb6a8023c032758be950"},
]
"ruamel.yaml" = [
{file = "ruamel.yaml-0.17.17-py3-none-any.whl", hash = "sha256:9af3ec5d7f8065582f3aa841305465025d0afd26c5fb54e15b964e11838fc74f"},
{file = "ruamel.yaml-0.17.17.tar.gz", hash = "sha256:9751de4cbb57d4bfbf8fc394e125ed4a2f170fbff3dc3d78abf50be85924f8be"},

View File

@@ -6,7 +6,7 @@ authors = ["Larry Smith Jr. <mrlesmithjr@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.10"
ansible = "2.9.7"
ansible = "4.2.0"
[tool.poetry.dev-dependencies]
bandit = "^1.7.1"

View File

@@ -1,5 +1,6 @@
ansible-core==2.11.6; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
ansible-lint==4.2.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
ansible==2.9.7; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
ansible==4.2.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
arrow==1.2.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
astroid==2.8.6; python_version >= "3.6" and python_version < "4.0"
autopep8==1.6.0
@@ -45,7 +46,7 @@ keyring==21.8.0; python_version >= "3.6" and python_version < "4.0" and (python_
lazy-object-proxy==1.6.0; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "4.0" or python_version >= "3.6" and python_version < "4.0" and python_full_version >= "3.6.0"
lockfile==0.12.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
markdown==3.3.6; python_version >= "3.6"
markupsafe==2.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
markupsafe==2.0.1; python_version >= "3.6"
mccabe==0.6.1; python_version >= "3.6" and python_version < "4.0"
mergedeep==1.3.4; python_version >= "3.6"
mkdocs==1.2.3; python_version >= "3.6"
@@ -88,6 +89,7 @@ pyyaml==5.4.1; python_full_version >= "3.6.1" and python_version >= "3.6" and (p
regex==2021.11.10; python_full_version >= "3.6.2"
requests-toolbelt==0.9.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
requests==2.26.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"
resolvelib==0.5.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
ruamel.yaml==0.17.17; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.7"
secretstorage==3.3.1; python_version >= "3.6" and python_version < "4.0" and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0") and sys_platform == "linux"
selinux==0.2.1; python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "linux" or python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "linux2" or sys_platform == "linux" and python_version >= "3.6" and python_full_version >= "3.5.0" or sys_platform == "linux2" and python_version >= "3.6" and python_full_version >= "3.5.0"

View File

@@ -1,7 +1,11 @@
ansible==2.9.7; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
ansible-core==2.11.6; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
ansible==4.2.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
cffi==1.15.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
cryptography==36.0.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
jinja2==3.0.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
markupsafe==2.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
packaging==20.9; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
pycparser==2.21; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
pyparsing==3.0.6; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
pyyaml==5.4.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0"
resolvelib==0.5.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"

View File

@@ -1,19 +1,15 @@
---
- name: centos | installing lvm2
- name: centos | installing lvm2 and sg3_utils
package:
name: lvm2
name:
- lvm2
- sg3_utils
state: present
become: true
- include_tasks: amazon.yml
when: ansible_facts.system_vendor == 'Amazon EC2'
- name: centos | installing sg3_utils
package:
name: sg3_utils
state: present
become: true
- name: centos | debug lvg
debug:
var: lv
@@ -38,20 +34,36 @@
- lv.1.create is defined
- lv.1.create|bool
- name: centos | checking for scsi devices
command: sg_scan
- name: centos | check for scsi adapters
find:
paths: "/sys/class/scsi_host"
file_type: any
become: true
register: scsi_devices
changed_when: false
register: scsi_adapters
- name: centos | rescanning for new disks
command: /usr/bin/rescan-scsi-bus.sh
become: true
changed_when: false
when: scsi_devices.stdout|length > 0
- block:
- name: centos | installing sg3_utils
package:
name: sg3_utils
state: present
become: true
- name: centos | rescanning for resized disks
command: /usr/bin/rescan-scsi-bus.sh -s
become: true
changed_when: false
when: scsi_devices.stdout|length > 0
- name: centos | checking for scsi devices
command: sg_scan
become: true
register: scsi_devices
changed_when: false
- name: centos | rescanning for new disks
command: "{{ rescan_scsi_command }}"
become: true
changed_when: false
when: scsi_devices.stdout|length > 0
- name: centos | rescanning for resized disks
command: "{{ rescan_scsi_command }} -s"
become: true
changed_when: false
when: scsi_devices.stdout|length > 0
when: scsi_adapters.matched > 0

View File

@@ -45,6 +45,7 @@
- lv.create|bool
- lv.filesystem is defined
- lv.filesystem != 'None'
- lv.filesystem != 'swap'
- lv.filesystem != 'xfs'
- name: create_fs | creating new xfs filesystem on new LVM logical volume(s)

View File

@@ -34,7 +34,7 @@
changed_when: false
- name: debian | rescanning for new disks added
command: /sbin/rescan-scsi-bus
command: "{{ rescan_scsi_command }}"
become: true
changed_when: false
when: scsi_devices['stdout'] | length

View File

@@ -1,5 +1,13 @@
---
# tasks file for ansible-manage-lvm
- name: Set rescan_scsi_command for old debian version
set_fact:
rescan_scsi_command: "/sbin/rescan-scsi-bus"
when:
- ansible_distribution | replace(' ','') | lower == 'debian'
- ansible_distribution_release not in ('bookworm', 'sid')
- ansible_distribution_major_version is version(10, '<=')
- include_tasks: debian.yml
when: ansible_facts.os_family == "Debian"

View File

@@ -3,3 +3,5 @@
ebsnvme_binary_helper_file: go-ebsnvme_{{ ebsnvme_binary_helper_ver }}_linux_amd64.tar.gz
ebsnvme_binary_helper_url: https://github.com/mvisonneau/go-ebsnvme/releases/download/{{ ebsnvme_binary_helper_ver }}/{{ ebsnvme_binary_helper_file }}
rescan_scsi_command: "/usr/bin/rescan-scsi-bus.sh"