Skip to content

Instantly share code, notes, and snippets.

@dariko
dariko / os_address_scope.yml
Created March 23, 2019 12:39
os_address_scope tests
- hosts: localhost
tasks:
- name: cleanup
os_address_scope:
state: absent
name: scope1
shared: false
register: out
- name: create address scope
(venv) user@dumb:/tmp/test$ for f in *yml;do echo "# $f #####";cat $f;ansible-playbook -D $f;done
# test_nouser.yml #####
- hosts: localhost
become: true
tasks:
- docker_swarm_service:
name: traefik-lb
state: absent
- docker_network:
name: traefik-net
--- docker_info_ok 2018-10-30 19:03:13.899080640 +0100
+++ docker_info_ko 2018-10-30 19:03:25.605417752 +0100
@@ -1,13 +1,13 @@
-Containers: 2
+Containers: 1
Running: 1
Paused: 0
- Stopped: 1
-Images: 1
+ Stopped: 0
@dariko
dariko / gist:3fdcc08227993ccee23d150c8f915f39
Created October 20, 2018 16:46
docker_swarm_service ansible module error on docker 1.13 (centos 7 version)
[centos@test ~]$ sudo su -
[root@test ~]# yum install epel-release
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: centos.mirrors.ovh.net
* extras: centos.mirror.ate.info
* updates: centos.mirrors.ovh.net
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
yum remove -y docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
D=/tmp/aa
rm -rf "$D"
mkdir -p "$BASEDIR"
alias nsx='ip netns exec'
ip link del v-r1-n1
ip link del v-r1-n2
ip link del v-n1-r1
ip link del v-n2-r1
ip netns del n1
ip netns del n2
@dariko
dariko / openstack-ansible_utility_commands.md
Created January 29, 2018 11:48
utility commands for openstack-ansible

mysql status

ansible galera -m shell -a "mysql -h localhost -e 'show status like \"%wsrep_cluster_%\";'"

rabbitmq status

ansible rabbitmq -m shell -a "rabbitmqctl cluster_status"