From a3d855e84ab6cdc43b7cbdb49f49815bb570b587 Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Thu, 21 Mar 2024 15:46:01 +0000 Subject: [PATCH 1/2] delete obsolete CentOS 6 files --- centos/centos-6.json | 53 ------------------------ centos/httpdir/centos-6.cfg | 27 ------------ centos/provisioners/cloud-init-6.patch | 12 ------ centos/provisioners/network-centos6.yaml | 29 ------------- 4 files changed, 121 deletions(-) delete mode 100644 centos/centos-6.json delete mode 100644 centos/httpdir/centos-6.cfg delete mode 100644 centos/provisioners/cloud-init-6.patch delete mode 100644 centos/provisioners/network-centos6.yaml diff --git a/centos/centos-6.json b/centos/centos-6.json deleted file mode 100644 index a1254be..0000000 --- a/centos/centos-6.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "builders": [ - { - "boot_command": [ - "", - " linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos-6.cfg", - "" - ], - "disk_size": 8000, - "format": "ova", - "guest_os_type": "RedHat_64", - "http_directory": "httpdir", - "http_port_max": 8550, - "http_port_min": 8500, - "iso_checksum": "sha256:56f7b078a3b443095ba006cdc85319c691251cda98c5d73d12ef6db7aff6b4c1", - "iso_url": "http://mirror.tedra.es/CentOS/6.10/isos/x86_64/CentOS-6.10-x86_64-netinstall.iso", - "shutdown_command": "shutdown -h now", - "ssh_password": "rootpassword", - "ssh_timeout": "90m", - "ssh_username": "root", - "type": "virtualbox-iso", - "vboxmanage": [ - [ - "modifyvm", - "{{.Name}}", - "--memory", - "1024" - ] - ], - "vm_name": "centos.6-2020.07.08" - } - ], - "provisioners": [ - { - "playbook_file": "provisioners/init.yaml", - "type": "ansible" - }, - { - "expect_disconnect": true, - "inline": [ - "reboot \u0026", - "sleep 5s" - ], - "type": "shell" - }, - { - "pause_before": "30s", - "playbook_file": "provisioners/config.yaml", - "type": "ansible" - } - ] -} - diff --git a/centos/httpdir/centos-6.cfg b/centos/httpdir/centos-6.cfg deleted file mode 100644 index 97f78e2..0000000 --- a/centos/httpdir/centos-6.cfg +++ /dev/null @@ -1,27 +0,0 @@ -install -url --url=http://mirror.nextlayer.at/centos/6/os/x86_64/ -lang en_US.UTF-8 -keyboard us -network --device=eth0 --bootproto dhcp --onboot=yes --noipv6 -rootpw rootpassword -firewall --enable --ssh -authconfig --enableshadow --passalgo=sha512 -selinux --disabled -timezone UTC -bootloader --location=mbr -text -skipx -zerombr -clearpart --all --initlabel -part / --size=1 --grow --fstype ext4 -auth --useshadow --enablemd5 -firstboot --disabled -reboot -%packages --nobase -@core -openssh-clients -openssh-server -%end -%post -/usr/bin/yum -y install sudo -%end diff --git a/centos/provisioners/cloud-init-6.patch b/centos/provisioners/cloud-init-6.patch deleted file mode 100644 index 2762e30..0000000 --- a/centos/provisioners/cloud-init-6.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- DataSourceOpenNebula.py 2014-10-31 11:57:41.000000000 +0000 -+++ DataSourceOpenNebula.py.orig 2015-06-17 11:02:47.134757659 +0000 -@@ -288,7 +288,7 @@ - - - def switch_user_cmd(user): -- return ['runuser', '-u', user, '--'] -+ return ['sudo', '-u', user] - - def parse_shell_config(content, keylist=None, bash=None, asuser=None, - switch_user_cb=None): - diff --git a/centos/provisioners/network-centos6.yaml b/centos/provisioners/network-centos6.yaml deleted file mode 100644 index 55a76c5..0000000 --- a/centos/provisioners/network-centos6.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- name: Remove hardware address from configuration files - lineinfile: - path: "{{ item }}" - state: absent - regexp: '^(HWADDR|UUID)' - with_fileglob: - - "/etc/sysconfig/network-scripts/ifcfg-eth*" - -- name: Remove udev rules - file: - path: "{{ item }}" - state: absent - with_fileglob: - - /etc/udev/rules.d/70-persistent-net.rules - - /etc/udev/rules.d/70-persistent-cd.rules - -- name: enable network service - service: - name: network - state: started - enabled: yes - -- name: adjust /sysconfig/network - blockinfile: - path: /etc/sysconfig/network - block: | - NOZEROCONF=yes - NETWORKING=yes From 307bc8340258289b728861f30a9126aa322fc7e4 Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Thu, 21 Mar 2024 15:49:03 +0000 Subject: [PATCH 2/2] remove old centos config --- centos/provisioners/cloud-init.yaml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/centos/provisioners/cloud-init.yaml b/centos/provisioners/cloud-init.yaml index 1de8edf..4761a88 100644 --- a/centos/provisioners/cloud-init.yaml +++ b/centos/provisioners/cloud-init.yaml @@ -10,26 +10,6 @@ name: [cloud-init, cloud-utils-growpart] state: latest -- name: extra packages for centos 6 - yum: - name: [dracut-modules-growroot, patch, parted] - state: latest - when: ansible_distribution_major_version == "6" - -- name: copy cloud-init patch - copy: - src: cloud-init-6.patch - dest: /tmp/cloud-init.patch - -- name: patch cloud-init - shell: | - pushd /usr/lib/python2.6/site-packages/cloudinit/sources - patch < /tmp/cloud-init.patch - rm /tmp/cloud-init.patch - popd - python -c "import cloudinit.sources.DataSourceOpenNebula" - when: ansible_distribution_major_version == "6" - - name: Create fedcloud config copy: content: | @@ -40,12 +20,6 @@ # Regenerate keys ssh_deletekeys: True ssh_genkeytypes: ['rsa', 'dsa'] - - # In OpenNebula, use network based datasource, - # so that it can successfully resolve IPv4 based hostname - datasource: - OpenNebula: - dsmode: net dest: /etc/cloud/cloud.cfg.d/01_fedcloud.cfg - name: enable service