Skip to content

Instantly share code, notes, and snippets.

@skahler-yuga
Last active March 31, 2021 16:26
Show Gist options
  • Save skahler-yuga/3dc772d0ba74278b6c4e62be7bbdb56c to your computer and use it in GitHub Desktop.
Save skahler-yuga/3dc772d0ba74278b6c4e62be7bbdb56c to your computer and use it in GitHub Desktop.
running ansible in the yugaware container

In order to run ansible within the yugaware docker container you need to add the python environment this is done with a pywrapper script in the devops bin directory

cd /opt/yugabyte/devops

./bin/pywrapper ansible-playbook ...

Example

cd /opt/yugabyte/

./bin/py_wrapper ansible-playbook "/opt/yugabyte/devops/test_connection.yml" --vault-password-file /opt/yugabyte/yugaware/data/keys/84a569e8-558e-4613-bad0-b3c2749594c5/kahlerdc-key.vault_password --private-key /opt/yugabyte/yugaware/data/keys/84a569e8-558e-4613-bad0-b3c2749594c5/kahlerdc-key.pem --user centos -i "192.168.10.101," -c ssh -e "ansible_python_interpreter='/usr/bin/env python'" --extra-vars "{\"mount_points\": \"/data\", \"instance_search_pattern\": \"all\", \"public_ip\": \"192.168.10.101\", \"private_ip\": \"192.168.10.101\", \"custom_ssh_port\": \"22\", \"cloud_type\": \"onprem\", \"num_volumes\": 5, \"ssh_user\": \"centos\", \"cloud_zone\": \"KCHome\", \"disk_iops\": 1000, \"user_name\": \"yugabyte\", \"server_type\": \"cluster-server\", \"ssd_size_gb\": 50, \"yb_home_dir\": \"/home/yugabyte\", \"placement_cloud\": \"onprem\", \"placement_zone\": \"KCHome\", \"yb_ansible_host\": \"ybcloud01\", \"vars_file\": \"/opt/yugabyte/yugaware/data/keys/84a569e8-558e-4613-bad0-b3c2749594c5/kahlerdc-key.vault\", \"ansible_port\": 22, \"placement_region\": \"KCHome\", \"yb_server_ssh_user\": \"centos\", \"instance_name\": \"yb-dev-kahler-home-universe-n1\", \"instance_type\": \"HomeVMOne\", \"cloud_region\": \"KCHome\"}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment