This file contains hidden or 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 | |
gather_facts: false | |
vars: | |
my_python_script_content: |- | |
import sys | |
sys.stdout.write('test') | |
tasks: |
This file contains hidden or 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 = {{ item.name }} | |
username = {{ item.username }} |
This file contains hidden or 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
--- | |
all: | |
vars: | |
ansible_connection: docker | |
hosts: | |
ans_centos7: | |
ans_centos8: |
This file contains hidden or 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: this is play 1 | |
hosts: my_hosts | |
tasks: | |
- name: this is task1 using the expect module | |
expect: | |
command: /bin/true | |
responses: | |
'response 1': answer 1 |
This file contains hidden or 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 | |
gather_facts: false | |
vars: | |
cidre_version: "{{ lookup('file', '/tmp/VERSION', errors='ignore') | default('v0.1.0', true) }}" | |
tasks: | |
- name: Show initial version | |
debug: |
This file contains hidden or 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_group] | |
localhost test_var=88 | |
# This is the group definition used for the second run (remove previous) | |
# [test_group] | |
# localhost | |
[test_group:vars] | |
test_var=99 |
This file contains hidden or 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 | |
gather_facts: false | |
vars: | |
test_values: | |
- no | |
- No | |
- "no" | |
- "No" |
This file contains hidden or 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
--- | |
all: | |
vars: | |
ansible_python_interpreter: auto | |
hosts: | |
test: | |
ansible_connection: docker |
This file contains hidden or 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
--- | |
all: | |
hosts: | |
my_vm_target: | |
ansible_host: 127.0.0.1 | |
ansible_port: 2222 |
This file contains hidden or 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
$ docker run -it --rm php:7.4.2-apache-buster bash -c "apt update && apt install -y libxslt1-dev && docker-php-ext-install xsl" | |
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB] | |
Get:2 http://deb.debian.org/debian buster InRelease [121 kB] | |
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB] | |
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [260 kB] | |
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB] | |
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7860 B] | |
Fetched 8414 kB in 2s (4695 kB/s) | |
Reading package lists... Done | |
Building dependency tree |