2021-07-13 05:42:49 +00:00
# TEST ANSIBLE COMMANDS/MODULES IN SECONDS -- BY RUNNING:
# ansible-playbook -i ansible_hosts test.yml --connection=local
- hosts : all
become : yes # Optional privilege escalation
#vars_files:
#- roles/0-init/defaults/main.yml
#- vars/default_vars.yml
#- vars/{{ ansible_local.local_facts.os_ver }}.yml
#- /etc/iiab/local_vars.yml
#- /etc/iiab/iiab_state.yml
#roles:
# - { role: 0-init }
tasks :
#- include_role:
# name: 0-init
- debug :
2021-07-13 21:56:02 +00:00
msg : "{{ 'changeme' | password_hash('sha512') }}"
2021-08-19 01:47:46 +00:00
# msg: "{{ 'changeme' | password_hash('yescrypt') }}" # crypt.crypt STILL doesn't support 'yescrypt' algorithm ?
2021-07-13 05:42:49 +00:00
#- pause:
2021-07-13 21:56:02 +00:00
- name : DOUBLE UP to escape single quotes... '"''"' e.g. iiab.ini Munin description
debug :
msg : '"' '"' # FAILS: '"\'"'
- name : BACKSLASH to escape double quotes... "'\"'" e.g. cups/tasks/install.yml
debug :
msg : "'\"'" # FAILS: "'""'"
2021-07-13 05:42:49 +00:00
2021-08-19 01:47:46 +00:00
- name : a shows "VARIABLE IS NOT DEFINED!" -- whereas b (w/o whitespace) AND c (with space) AND d (with tab) show null (without quotes!) -- whereas d (singlequotes) and e (doublequotes) show "" empty string
set_fact :
#a:
b :
c : # Space
d: # Tab
e : ''
f : ""
- debug :
var : a
- debug :
var : b
- debug :
var : c
- debug :
var : d
- debug :
var : e
- debug :
var : f
2021-07-13 05:42:49 +00:00
# TEST ANSIBLE COMMANDS/MODULES HERE!