-
-
Save danehans/fb819e06a9f272177d69 to your computer and use it in GitHub Desktop.
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
TASK: [etcd | Enable etcd] **************************************************** | |
failed: [core-node02.ctocllab.cisco.com] => {"failed": true} | |
msg: no service or tool found for: etcd2 | |
FATAL: all hosts have already failed -- aborting | |
PLAY RECAP ******************************************************************** | |
to retry, use: --limit @/root/cluster.retry | |
core-node02.ctocllab.cisco.com : ok=34 changed=4 unreachable=0 failed=1 |
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
- name: Enable etcd | |
service: name={{ etcd_svc_name }} enabled=yes | |
- name: Start etcd | |
service: name={{ etcd_svc_name }} state=started | |
register: etcd_started |
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
$ systemctl status etcd | |
● etcd.service - etcd | |
Loaded: loaded (/usr/lib64/systemd/system/etcd.service; static; vendor preset: disabled) | |
Active: inactive (dead) |
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
# Account name of remote user. Ansible will use this user account to ssh into | |
# the managed machines. The user must be able to use sudo without asking | |
# for password unless ansible_sudo_pass is set | |
ansible_ssh_user: core | |
# Required for CoreOS | |
# https://coreos.com/blog/managing-coreos-with-ansible.html | |
ansible_python_interpreter: "PATH=/opt/bin/:$PATH python" |
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
[masters] | |
core-node02.ctocllab.cisco.com | |
[etcd] | |
core-node02.ctocllab.cisco.com | |
[nodes] | |
core-node02.ctocllab.cisco.com |
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
#!/bin/bash | |
# Create the directories used for Docker bind mounting | |
mkdir -p /opt/bin/ | |
mkdir -p /tmp/.ansible/files | |
mkdir -p /etc/etcd | |
mkdir -p /etc/systemd/system | |
mkdir -p /usr/lib64/systemd/system | |
# Create the Python binary | |
cat > /opt/bin/python <<EOF | |
#!/bin/sh | |
tty > /dev/null 2>&1 && ttyflag='-t' | |
exec docker run -i --rm -v /opt/bin:/opt/bin \ | |
-v /etc/lsb-release:/etc/lsb-release \ | |
-v /etc/etcd/:/etc/etcd \ | |
-v /etc/systemd/system:/etc/systemd/system \ | |
-v /usr/lib64/systemd/system:/usr/lib64/systemd/system \ | |
-v /home/core:/home/core -v /tmp/.ansible/files:/tmp/.ansible/files \ | |
\$ttyflag --net=host python:2.7.11-alpine python "\$@" | |
EOF | |
sudo chmod +x /opt/bin/python | |
Roger that. I figured it out as I was falling asleep last night. I think my brain was fried :-)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're starting the container with
--net=none
, so you wouldn't expectwget
or anything else that requires the network to work...