Skip to content

Instantly share code, notes, and snippets.

@vMarkusK
Last active October 7, 2020 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vMarkusK/e0b854c16e73a4475413cefbecad8c65 to your computer and use it in GitHub Desktop.
Save vMarkusK/e0b854c16e73a4475413cefbecad8c65 to your computer and use it in GitHub Desktop.
Prepate CentOS 8
hostname ansible01
dnf install -y epel-release
dnf upgrade -y
dnf install -y open-vm-tools python3 git
useradd ansible
su ansible
echo 'ansible ALL=(ALL) NOPASSWD:ALL' >> visudo
pip3 install --user ansible
- name: Prepare Ansible Box for my Projects
hosts: localhost
gather_facts: false
tasks:
- name: Upgrade all packages
dnf:
name: "*"
state: latest
become: yes
- name: Autoremove unneeded packages installed as dependencies
dnf:
autoremove: yes
become: yes
- name: Install the PowerShell Package
dnf:
name: https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/powershell-7.0.3-1.centos.8.x86_64.rpm
disable_gpg_check: yes
become: yes
- name: Ansible-Lint setuptools
pip:
name: ansible-lint
extra_args: "--upgrade --user"
- name: PIP setuptools
pip:
name: setuptools
extra_args: "--upgrade --user"
- name: PIP NetApp SDK
pip:
name: netapp-lib
extra_args: "--upgrade --user"
- name: PIP WinRM
pip:
name: pywinrm
extra_args: "--upgrade --user"
- name: PIP pyVmomi
pip:
name: pyVmomi
extra_args: "--upgrade --user"
- name: PIP VMware vSphere Automation SDK for Python
pip:
name: git+https://github.com/vmware/vsphere-automation-sdk-python.git
extra_args: "--upgrade --user"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment