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 | |
set -eu | |
x=(333,343,353,363) | |
y=(0.025,0.05,0.1,0.2) | |
z=(a,b,c,d,e,f) | |
IFS=',' |
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: localhost | |
vars: | |
dictionary: | |
- method: msg | |
value: "Hello World" | |
tasks: | |
- name: Test | |
with_items: dictionary | |
action: debug |
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: localhost | |
roles: | |
- openstack/neutron |
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: localhost | |
vars: | |
file: /tmp/docker_compose | |
tasks: | |
- name: Create file with wrong checksum | |
copy: | |
dest: "{{ file }}" | |
content: 'Filecontent' | |
- name: Run get_url |
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: localhost | |
tasks: | |
- name: Demo | |
with_items: ['blue', 'red'] | |
when: item == 'blue' | |
debug: | |
var: '{{ item }}' |
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: Install a packge | |
with_items: | |
- packageA | |
- packageB | |
- packageC | |
when: packages.item | |
apt: | |
name: "{{ item }}" |
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
# configure ansible-galaxy | |
config.vm.provision :ansible do |ansible| | |
ansible.galaxy_roles_path = 'tests/roles/' | |
ansible.galaxy_role_file = 'tests/requirements.yml' | |
ansible.galaxy_command = 'ansible-galaxy install --role-file=%{role_file} --roles-path=%{roles_path} --ignore-errors --force' | |
end |
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: Reboot | |
tags: reboot | |
become: true | |
async: 1 | |
poll: 0 | |
shell: sleep 5 && /sbin/shutdown -r now | |
- name: Wait for ssh to come back | |
tags: reboot |
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
#!/usr/bin/env bash | |
set -euxo pipefail | |
ADDR=127.0.0.1:8300 | |
VAULT_ADDR=http://$ADDR | |
VAULT_TOKEN=123 | |
CT_VERSION=0.19.1 | |
if ! [[ -e vault_0.8.1_linux_amd64.zip ]]; then |
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
#!/usr/bin/env bash | |
set -euxo pipefail | |
ADDR=127.0.0.1:8300 | |
VAULT_ADDR=http://$ADDR | |
VAULT_TOKEN=123 | |
CT_VERSION=0.19.0 | |
if ! [[ -e vault_0.8.1_linux_amd64.zip ]]; then |
OlderNewer