Last active
June 12, 2019 16:01
-
-
Save sshnaidm/53841acabec3fcf229f6864ea040dadd to your computer and use it in GitHub Desktop.
Ansible podman testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test ansible_host=test ansible_connection=podman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: test | |
connection: podman | |
tasks: | |
- name: Install it | |
package: | |
name: vim | |
state: latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo "$(command -v dnf || command -v yum)" install -y git python-virtualenv podman | |
virtualenv --version || sudo easy_install virtualenv | |
virtualenv ansible-test | |
./ansible-test/bin/pip install -U pip | |
git clone https://github.com/ansible/ansible | |
cd ansible | |
git fetch origin pull/57741/head:podmantest | |
git checkout podmantest | |
../ansible-test/bin/pip install . | |
../ansible-test/bin/ansible-playbook --version | |
curl https://gist.githubusercontent.com/sshnaidm/53841acabec3fcf229f6864ea040dadd/raw/620f7d7a1cdc768c8cd5ea51763ecc7b01353ec8/inventory.ini > inventory.ini | |
curl https://gist.githubusercontent.com/sshnaidm/53841acabec3fcf229f6864ea040dadd/raw/620f7d7a1cdc768c8cd5ea51763ecc7b01353ec8/playbook.yaml > playbook.yaml | |
# if centos7 - run as root: | |
# sudo -i | |
# curl -o /etc/yum.repos.d/vbatts-shadow-utils-newxidmap-epel-7.repo https://copr.fedorainfracloud.org/coprs/vbatts/shadow-utils-newxidmap/repo/epel-7/vbatts-shadow-utils-newxidmap-epel-7.repo | |
# yum install -y shadow-utils46-newxidmap | |
# echo 10000 > /proc/sys/user/max_user_namespaces | |
# echo "user.max_user_namespaces=28633" > /etc/sysctl.d/userns.conf | |
# sysctl -p /etc/sysctl.d/userns.conf | |
# echo "centos:100000:65536" > /etc/subuid | |
# echo "centos:100000:65536" > /etc/subgid | |
# yum install -y slirp4netns | |
podman run -d --name test docker.io/python:3.6-alpine sleep 1d | |
# check if podman mount is allowed on this platform: `podman mount`, if it is - you shouldn't notice a change, if not - fix should work | |
../ansible-test/bin/ansible-playbook -vv playbook.yaml -i inventory.ini | |
podman exec -it test vim --version | |
# Without pull request | |
cd | |
virtualenv ansible-nopr | |
./ansible-nopr/bin/pip install -U pip | |
cd ansible-nopr | |
git clone https://github.com/ansible/ansible | |
cd ansible | |
~/ansible-nopr/bin/pip install . | |
~/ansible-nopr/bin/ansible-playbook --version | |
curl https://gist.githubusercontent.com/sshnaidm/53841acabec3fcf229f6864ea040dadd/raw/620f7d7a1cdc768c8cd5ea51763ecc7b01353ec8/inventory.ini > inventory.ini | |
curl https://gist.githubusercontent.com/sshnaidm/53841acabec3fcf229f6864ea040dadd/raw/620f7d7a1cdc768c8cd5ea51763ecc7b01353ec8/playbook.yaml > playbook.yaml | |
~/ansible-nopr/bin/ansible-playbook -vv playbook.yaml -i inventory.ini | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment