Skip to content

Instantly share code, notes, and snippets.

@hluaces
Created October 1, 2020 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hluaces/9ea208b4123d6eeb70866515286988a3 to your computer and use it in GitHub Desktop.
Save hluaces/9ea208b4123d6eeb70866515286988a3 to your computer and use it in GitHub Desktop.
Bug blockinfile in ansible 2.10 output
ansible-playbook 2.10.1
config file = None
configured module search path = ['/home/hector/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/hector/.local/lib/python3.8/site-packages/ansible
executable location = /home/hector/.local/bin/ansible-playbook
python version = 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
yaml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
ini declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
toml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Loading callback plugin default of type stdout, v2.0 from /home/hector/.local/lib/python3.8/site-packages/ansible/plugins/callback/default.py
PLAYBOOK: playbook.yml *********************************************************
Positional arguments: playbook.yml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/etc/ansible/hosts',)
forks: 5
1 plays in playbook.yml
PLAY [blockinfile bug demonstration] *******************************************
TASK [Gathering Facts] *********************************************************
task path: /home/hector/repos/bugs/ansible_210_blockinfile/playbook.yml:3
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: hector
<127.0.0.1> EXEC /bin/sh -c 'echo ~hector && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/hector/.ansible/tmp `"&& mkdir "` echo /home/hector/.ansible/tmp/ansible-tmp-1601547906.3326805-425734-209775855923292 `" && echo ansible-tmp-1601547906.3326805-425734-209775855923292="` echo /home/hector/.ansible/tmp/ansible-tmp-1601547906.3326805-425734-209775855923292 `" ) && sleep 0'
Using module file /home/hector/.local/lib/python3.8/site-packages/ansible/modules/setup.py
<127.0.0.1> PUT /home/hector/.ansible/tmp/ansible-local-425730lpya12vd/tmpdqhwc7cq TO /home/hector/.ansible/tmp/ansible-tmp-1601547906.3326805-425734-209775855923292/AnsiballZ_setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/hector/.ansible/tmp/ansible-tmp-1601547906.3326805-425734-209775855923292/ /home/hector/.ansible/tmp/ansible-tmp-1601547906.3326805-425734-209775855923292/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/hector/.ansible/tmp/ansible-tmp-1601547906.3326805-425734-209775855923292/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/hector/.ansible/tmp/ansible-tmp-1601547906.3326805-425734-209775855923292/ > /dev/null 2>&1 && sleep 0'
ok: [localhost]
META: ran handlers
TASK [Copy some contents on a file] ********************************************
task path: /home/hector/repos/bugs/ansible_210_blockinfile/playbook.yml:9
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: hector
<127.0.0.1> EXEC /bin/sh -c 'echo ~hector && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/hector/.ansible/tmp `"&& mkdir "` echo /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511 `" && echo ansible-tmp-1601547907.278463-425860-43652336457511="` echo /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511 `" ) && sleep 0'
Using module file /home/hector/.local/lib/python3.8/site-packages/ansible/modules/stat.py
<127.0.0.1> PUT /home/hector/.ansible/tmp/ansible-local-425730lpya12vd/tmpgfqwyvvt TO /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/AnsiballZ_stat.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/ /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/AnsiballZ_stat.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/AnsiballZ_stat.py && sleep 0'
<127.0.0.1> PUT /home/hector/.ansible/tmp/ansible-local-425730lpya12vd/tmpb3rid7id TO /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/source
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/ /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/source && sleep 0'
Using module file /home/hector/.local/lib/python3.8/site-packages/ansible/modules/copy.py
<127.0.0.1> PUT /home/hector/.ansible/tmp/ansible-local-425730lpya12vd/tmp6121ffuf TO /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/AnsiballZ_copy.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/ /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/AnsiballZ_copy.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/AnsiballZ_copy.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"changed": true,
"checksum": "a189a04d375b4c98e902129ac4441a3ab5c502dd",
"dest": "/tmp/test",
"diff": [],
"gid": 1001,
"group": "hector",
"invocation": {
"module_args": {
"_original_basename": "tmpb3rid7id",
"attributes": null,
"backup": false,
"checksum": "a189a04d375b4c98e902129ac4441a3ab5c502dd",
"content": null,
"dest": "/tmp/test",
"directory_mode": null,
"follow": false,
"force": false,
"group": "hector",
"local_follow": null,
"mode": "0640",
"owner": "hector",
"remote_src": null,
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": "/home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/source",
"unsafe_writes": false,
"validate": null
}
},
"md5sum": "5360238ffb47c852be059fe9d257da1f",
"mode": "0640",
"owner": "hector",
"size": 21,
"src": "/home/hector/.ansible/tmp/ansible-tmp-1601547907.278463-425860-43652336457511/source",
"state": "file",
"uid": 1001
}
TASK [Add a block to the file] *************************************************
task path: /home/hector/repos/bugs/ansible_210_blockinfile/playbook.yml:18
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: hector
<127.0.0.1> EXEC /bin/sh -c 'echo ~hector && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/hector/.ansible/tmp `"&& mkdir "` echo /home/hector/.ansible/tmp/ansible-tmp-1601547907.7832882-425900-85446462517732 `" && echo ansible-tmp-1601547907.7832882-425900-85446462517732="` echo /home/hector/.ansible/tmp/ansible-tmp-1601547907.7832882-425900-85446462517732 `" ) && sleep 0'
Using module file /home/hector/.local/lib/python3.8/site-packages/ansible/modules/blockinfile.py
<127.0.0.1> PUT /home/hector/.ansible/tmp/ansible-local-425730lpya12vd/tmpazoafspd TO /home/hector/.ansible/tmp/ansible-tmp-1601547907.7832882-425900-85446462517732/AnsiballZ_blockinfile.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/hector/.ansible/tmp/ansible-tmp-1601547907.7832882-425900-85446462517732/ /home/hector/.ansible/tmp/ansible-tmp-1601547907.7832882-425900-85446462517732/AnsiballZ_blockinfile.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/hector/.ansible/tmp/ansible-tmp-1601547907.7832882-425900-85446462517732/AnsiballZ_blockinfile.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/hector/.ansible/tmp/ansible-tmp-1601547907.7832882-425900-85446462517732/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"changed": true,
"diff": [
{
"after": "",
"after_header": "/tmp/test (content)",
"before": "",
"before_header": "/tmp/test (content)"
},
{
"after": {
"mode": "0600"
},
"after_header": "/tmp/test (file attributes)",
"before": {
"mode": "0640"
},
"before_header": "/tmp/test (file attributes)"
}
],
"invocation": {
"module_args": {
"attributes": null,
"backup": false,
"block": "# This is the first line of the block\n# This is the second line of the block\n",
"create": false,
"group": null,
"insertafter": null,
"insertbefore": null,
"marker": "# {mark} First block",
"marker_begin": "BEGIN",
"marker_end": "END",
"mode": "0600",
"owner": null,
"path": "/tmp/test",
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"state": "present",
"unsafe_writes": false,
"validate": null
}
},
"msg": "Block inserted and ownership, perms or SE linux context changed"
}
META: ran handlers
META: ran handlers
PLAY RECAP *********************************************************************
localhost : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
ansible-playbook 2.10.1
config file = None
configured module search path = ['/home/hector/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/hector/.local/lib/python3.8/site-packages/ansible
executable location = /home/hector/.local/bin/ansible-playbook
python version = 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
yaml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
ini declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
toml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Loading callback plugin default of type stdout, v2.0 from /home/hector/.local/lib/python3.8/site-packages/ansible/plugins/callback/default.py
PLAYBOOK: playbook.yml *********************************************************
Positional arguments: playbook.yml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/etc/ansible/hosts',)
forks: 5
1 plays in playbook.yml
PLAY [blockinfile bug demonstration] *******************************************
TASK [Gathering Facts] *********************************************************
task path: /home/hector/repos/bugs/ansible_210_blockinfile/playbook.yml:3
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: hector
<127.0.0.1> EXEC /bin/sh -c 'echo ~hector && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/hector/.ansible/tmp `"&& mkdir "` echo /home/hector/.ansible/tmp/ansible-tmp-1601547909.4984574-425943-85246667469152 `" && echo ansible-tmp-1601547909.4984574-425943-85246667469152="` echo /home/hector/.ansible/tmp/ansible-tmp-1601547909.4984574-425943-85246667469152 `" ) && sleep 0'
Using module file /home/hector/.local/lib/python3.8/site-packages/ansible/modules/setup.py
<127.0.0.1> PUT /home/hector/.ansible/tmp/ansible-local-425931k3rbsoel/tmp43keza7x TO /home/hector/.ansible/tmp/ansible-tmp-1601547909.4984574-425943-85246667469152/AnsiballZ_setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/hector/.ansible/tmp/ansible-tmp-1601547909.4984574-425943-85246667469152/ /home/hector/.ansible/tmp/ansible-tmp-1601547909.4984574-425943-85246667469152/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/hector/.ansible/tmp/ansible-tmp-1601547909.4984574-425943-85246667469152/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/hector/.ansible/tmp/ansible-tmp-1601547909.4984574-425943-85246667469152/ > /dev/null 2>&1 && sleep 0'
ok: [localhost]
META: ran handlers
TASK [Copy some contents on a file] ********************************************
task path: /home/hector/repos/bugs/ansible_210_blockinfile/playbook.yml:9
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: hector
<127.0.0.1> EXEC /bin/sh -c 'echo ~hector && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/hector/.ansible/tmp `"&& mkdir "` echo /home/hector/.ansible/tmp/ansible-tmp-1601547910.437837-426071-91844231423168 `" && echo ansible-tmp-1601547910.437837-426071-91844231423168="` echo /home/hector/.ansible/tmp/ansible-tmp-1601547910.437837-426071-91844231423168 `" ) && sleep 0'
Using module file /home/hector/.local/lib/python3.8/site-packages/ansible/modules/stat.py
<127.0.0.1> PUT /home/hector/.ansible/tmp/ansible-local-425931k3rbsoel/tmpn4z8lq96 TO /home/hector/.ansible/tmp/ansible-tmp-1601547910.437837-426071-91844231423168/AnsiballZ_stat.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/hector/.ansible/tmp/ansible-tmp-1601547910.437837-426071-91844231423168/ /home/hector/.ansible/tmp/ansible-tmp-1601547910.437837-426071-91844231423168/AnsiballZ_stat.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/hector/.ansible/tmp/ansible-tmp-1601547910.437837-426071-91844231423168/AnsiballZ_stat.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/hector/.ansible/tmp/ansible-tmp-1601547910.437837-426071-91844231423168/ > /dev/null 2>&1 && sleep 0'
ok: [localhost] => {
"changed": false,
"dest": "/tmp/test",
"invocation": {
"content": "CENSORED: content is a no_log parameter",
"dest": "/tmp/test",
"force": false,
"group": "hector",
"mode": "0640",
"module_args": {
"content": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"dest": "/tmp/test",
"force": false,
"group": "hector",
"mode": "0640",
"owner": "hector"
},
"owner": "hector"
},
"src": "/home/hector/.ansible/tmp/ansible-local-425931k3rbsoel/tmpfvqwdcwa"
}
TASK [Add a block to the file] *************************************************
task path: /home/hector/repos/bugs/ansible_210_blockinfile/playbook.yml:18
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: hector
<127.0.0.1> EXEC /bin/sh -c 'echo ~hector && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/hector/.ansible/tmp `"&& mkdir "` echo /home/hector/.ansible/tmp/ansible-tmp-1601547910.7152812-426100-219285359574635 `" && echo ansible-tmp-1601547910.7152812-426100-219285359574635="` echo /home/hector/.ansible/tmp/ansible-tmp-1601547910.7152812-426100-219285359574635 `" ) && sleep 0'
Using module file /home/hector/.local/lib/python3.8/site-packages/ansible/modules/blockinfile.py
<127.0.0.1> PUT /home/hector/.ansible/tmp/ansible-local-425931k3rbsoel/tmpg2lv7lo4 TO /home/hector/.ansible/tmp/ansible-tmp-1601547910.7152812-426100-219285359574635/AnsiballZ_blockinfile.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/hector/.ansible/tmp/ansible-tmp-1601547910.7152812-426100-219285359574635/ /home/hector/.ansible/tmp/ansible-tmp-1601547910.7152812-426100-219285359574635/AnsiballZ_blockinfile.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/hector/.ansible/tmp/ansible-tmp-1601547910.7152812-426100-219285359574635/AnsiballZ_blockinfile.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/hector/.ansible/tmp/ansible-tmp-1601547910.7152812-426100-219285359574635/ > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
"changed": true,
"diff": [
{
"after": "",
"after_header": "/tmp/test (content)",
"before": "",
"before_header": "/tmp/test (content)"
},
{
"after_header": "/tmp/test (file attributes)",
"before_header": "/tmp/test (file attributes)"
}
],
"invocation": {
"module_args": {
"attributes": null,
"backup": false,
"block": "# This is the first line of the block\n# This is the second line of the block\n",
"create": false,
"group": null,
"insertafter": null,
"insertbefore": null,
"marker": "# {mark} First block",
"marker_begin": "BEGIN",
"marker_end": "END",
"mode": "0600",
"owner": null,
"path": "/tmp/test",
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"state": "present",
"unsafe_writes": false,
"validate": null
}
},
"msg": "Block inserted"
}
META: ran handlers
META: ran handlers
PLAY RECAP *********************************************************************
localhost : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
ansible-playbook 2.10.1
config file = None
configured module search path = ['/home/hector/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/hector/.local/lib/python3.8/site-packages/ansible
executable location = /home/hector/.local/bin/ansible-playbook
python version = 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0]
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
yaml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
ini declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Skipping due to inventory source not existing or not being readable by the current user
toml declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Loading callback plugin default of type stdout, v2.0 from /home/hector/.local/lib/python3.8/site-packages/ansible/plugins/callback/default.py
PLAYBOOK: playbook.yml *********************************************************
Positional arguments: playbook.yml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/etc/ansible/hosts',)
forks: 5
1 plays in playbook.yml
PLAY [blockinfile bug demonstration] *******************************************
TASK [Gathering Facts] *********************************************************
task path: /home/hector/repos/bugs/ansible_210_blockinfile/playbook.yml:3
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: hector
<127.0.0.1> EXEC /bin/sh -c 'echo ~hector && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/hector/.ansible/tmp `"&& mkdir "` echo /home/hector/.ansible/tmp/ansible-tmp-1601547911.9517975-426136-121793157155254 `" && echo ansible-tmp-1601547911.9517975-426136-121793157155254="` echo /home/hector/.ansible/tmp/ansible-tmp-1601547911.9517975-426136-121793157155254 `" ) && sleep 0'
Using module file /home/hector/.local/lib/python3.8/site-packages/ansible/modules/setup.py
<127.0.0.1> PUT /home/hector/.ansible/tmp/ansible-local-426132aismo2od/tmpimu2v78g TO /home/hector/.ansible/tmp/ansible-tmp-1601547911.9517975-426136-121793157155254/AnsiballZ_setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/hector/.ansible/tmp/ansible-tmp-1601547911.9517975-426136-121793157155254/ /home/hector/.ansible/tmp/ansible-tmp-1601547911.9517975-426136-121793157155254/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/hector/.ansible/tmp/ansible-tmp-1601547911.9517975-426136-121793157155254/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/hector/.ansible/tmp/ansible-tmp-1601547911.9517975-426136-121793157155254/ > /dev/null 2>&1 && sleep 0'
ok: [localhost]
META: ran handlers
TASK [Copy some contents on a file] ********************************************
task path: /home/hector/repos/bugs/ansible_210_blockinfile/playbook.yml:9
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: hector
<127.0.0.1> EXEC /bin/sh -c 'echo ~hector && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/hector/.ansible/tmp `"&& mkdir "` echo /home/hector/.ansible/tmp/ansible-tmp-1601547912.8405645-426262-153490204960998 `" && echo ansible-tmp-1601547912.8405645-426262-153490204960998="` echo /home/hector/.ansible/tmp/ansible-tmp-1601547912.8405645-426262-153490204960998 `" ) && sleep 0'
Using module file /home/hector/.local/lib/python3.8/site-packages/ansible/modules/stat.py
<127.0.0.1> PUT /home/hector/.ansible/tmp/ansible-local-426132aismo2od/tmph_7x6t51 TO /home/hector/.ansible/tmp/ansible-tmp-1601547912.8405645-426262-153490204960998/AnsiballZ_stat.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/hector/.ansible/tmp/ansible-tmp-1601547912.8405645-426262-153490204960998/ /home/hector/.ansible/tmp/ansible-tmp-1601547912.8405645-426262-153490204960998/AnsiballZ_stat.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/hector/.ansible/tmp/ansible-tmp-1601547912.8405645-426262-153490204960998/AnsiballZ_stat.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/hector/.ansible/tmp/ansible-tmp-1601547912.8405645-426262-153490204960998/ > /dev/null 2>&1 && sleep 0'
ok: [localhost] => {
"changed": false,
"dest": "/tmp/test",
"invocation": {
"content": "CENSORED: content is a no_log parameter",
"dest": "/tmp/test",
"force": false,
"group": "hector",
"mode": "0640",
"module_args": {
"content": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"dest": "/tmp/test",
"force": false,
"group": "hector",
"mode": "0640",
"owner": "hector"
},
"owner": "hector"
},
"src": "/home/hector/.ansible/tmp/ansible-local-426132aismo2od/tmp454r_f5_"
}
TASK [Add a block to the file] *************************************************
task path: /home/hector/repos/bugs/ansible_210_blockinfile/playbook.yml:18
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: hector
<127.0.0.1> EXEC /bin/sh -c 'echo ~hector && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/hector/.ansible/tmp `"&& mkdir "` echo /home/hector/.ansible/tmp/ansible-tmp-1601547913.1418033-426293-249560131936917 `" && echo ansible-tmp-1601547913.1418033-426293-249560131936917="` echo /home/hector/.ansible/tmp/ansible-tmp-1601547913.1418033-426293-249560131936917 `" ) && sleep 0'
Using module file /home/hector/.local/lib/python3.8/site-packages/ansible/modules/blockinfile.py
<127.0.0.1> PUT /home/hector/.ansible/tmp/ansible-local-426132aismo2od/tmpt99id933 TO /home/hector/.ansible/tmp/ansible-tmp-1601547913.1418033-426293-249560131936917/AnsiballZ_blockinfile.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/hector/.ansible/tmp/ansible-tmp-1601547913.1418033-426293-249560131936917/ /home/hector/.ansible/tmp/ansible-tmp-1601547913.1418033-426293-249560131936917/AnsiballZ_blockinfile.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/hector/.ansible/tmp/ansible-tmp-1601547913.1418033-426293-249560131936917/AnsiballZ_blockinfile.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/hector/.ansible/tmp/ansible-tmp-1601547913.1418033-426293-249560131936917/ > /dev/null 2>&1 && sleep 0'
ok: [localhost] => {
"changed": false,
"diff": [
{
"after": "",
"after_header": "/tmp/test (content)",
"before": "",
"before_header": "/tmp/test (content)"
},
{
"after_header": "/tmp/test (file attributes)",
"before_header": "/tmp/test (file attributes)"
}
],
"invocation": {
"module_args": {
"attributes": null,
"backup": false,
"block": "# This is the first line of the block\n# This is the second line of the block\n",
"create": false,
"group": null,
"insertafter": null,
"insertbefore": null,
"marker": "# {mark} First block",
"marker_begin": "BEGIN",
"marker_end": "END",
"mode": "0600",
"owner": null,
"path": "/tmp/test",
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"state": "present",
"unsafe_writes": false,
"validate": null
}
},
"msg": ""
}
META: ran handlers
META: ran handlers
PLAY RECAP *********************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment