Generarates inventory for ansible from etcd using python-etcd library.
The script assumes etcd.ini to be present alongside it. To choose a different path, set the ETCD_INI_PATH environment variable:
export ETCD_INI_PATH=/path/to/etcd.ini
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: haproxy | |
| spec: | |
| hostNetwork: true | |
| containers: | |
| - name: haproxy | |
| image: docker pull million12/haproxy:1.6.3 # From https://hub.docker.com/r/million12/haproxy/ | |
| ports: |
| INFO:kolla.cmd.build:magnum-conductor:Successfully built 5ddf244ee692 | |
| INFO:kolla.cmd.build:magnum-conductor:Built | |
| INFO:kolla.cmd.build:magnum-api: ---> beccf213151b | |
| INFO:kolla.cmd.build:magnum-api:Removing intermediate container b0eae78455db | |
| INFO:kolla.cmd.build:magnum-api:Step 4 : RUN chmod 755 /usr/local/bin/kolla_magnum_extend_start | |
| INFO:kolla.cmd.build:magnum-api: ---> Running in 0974e7dbb72f | |
| INFO:kolla.cmd.build:magnum-api: ---> e3977fd6f395 | |
| INFO:kolla.cmd.build:magnum-api:Removing intermediate container 0974e7dbb72f | |
| INFO:kolla.cmd.build:magnum-api:Step 5 : USER magnum | |
| INFO:kolla.cmd.build:magnum-api: ---> Running in 283b3f9a125a |
| TASK: [prechecks | Checking Docker version] *********************************** | |
| ok: [localhost] | |
| ... | |
| TASK: [prechecks | Checking if 'MountFlags' in /lib/systemd/system/docker.service is set to 'shared'] *** | |
| skipping: [localhost] | |
| TASK: [prechecks | Checking if '/run' mount flag is set to 'shared'] ********** | |
| failed: [localhost] => {"changed": false, "cmd": ["awk", "$5 == \"/run\" {print $7}", "/proc/self/mountinfo"], "delta": "0:00:00.003839", "end": "2016-04-18 17:39:34.331392", "failed": true, "failed_when_result": true, "rc": 0, "start": "2016-04-18 17:39:34.327553", "stdout_lines": ["-"], "warnings": []} | |
| stdout: - |
| TASK: [prechecks | Checking if '/run' mount flag is set to 'shared'] ********** | |
| failed: [localhost] => {"changed": false, "cmd": ["awk", "$5 == \"/run\" {print $7}", "/proc/self/mountinfo"], "delta": "0:00:00.004519", "end": "2016-04-18 18:14:39.523014", "failed": true, "failed_when_result": true, "rc": 0, "start": "2016-04-18 18:14:39.518495", "stdout_lines": ["-"], "warnings": []} | |
| stdout: - | |
| FATAL: all hosts have already failed -- aborting | |
| PLAY RECAP ******************************************************************** | |
| to retry, use: --limit @/root/prechecks.retry | |
| localhost : ok=59 changed=0 unreachable=0 failed=1 |
| # Install Vagrant on your Mac: https://www.vagrantup.com/ | |
| # Here is the version I use | |
| $ vagrant --version | |
| Vagrant 1.8.1 | |
| # Virtualbox (vbox) is the default Vagrant provider, so it should be installed with Vagrant. | |
| # I use vbox v5.0.16. If you need to install vbox, follow these directions: https://www.virtualbox.org/ | |
| # Copy the Vagrant file in this gist to your laptop. |
| [NetDev] | |
| Name=bond0 | |
| Kind=bond | |
| [Bond] | |
| Mode=802.3ad | |
| TransmitHashPolicy=layer2 | |
| MIIMonitorSec=1 | |
| LACPTransmitRate=fast |
| $ systemctl cat dnsmasq | |
| # /etc/systemd/system/bootcfg.service | |
| [Unit] | |
| Description=coreos-baremetal project | |
| After=docker.service | |
| Requires=docker.service | |
| [Service] | |
| Restart=always | |
| TimeoutStartSec=0 |