mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 03:05:34 +00:00
test.yml: Tips to try ad hoc Ansible commands
This commit is contained in:
parent
b88a3854df
commit
86fa7bd49c
1 changed files with 10 additions and 1 deletions
11
test.yml
11
test.yml
|
@ -1,6 +1,13 @@
|
|||
# TEST ANSIBLE COMMANDS/MODULES IN SECONDS -- BY RUNNING:
|
||||
# ansible-playbook -i ansible_hosts test.yml --connection=local
|
||||
|
||||
# TEST A SINGLE ANSIBLE COMMAND/MODULE:
|
||||
# ansible localhost -m ansible.builtin.setup | grep -e "ansible_machine\b" -e ansible_architecture
|
||||
# ansible localhost -m ansible.builtin.shell -a 'echo $TERM'
|
||||
# ansible localhost -m ansible.builtin.copy -a "src=/etc/hosts dest=/tmp/hosts"
|
||||
# ansible localhost -m ansible.builtin.systemd -a "name=nginx state=restarted"
|
||||
# https://docs.ansible.com/ansible/latest/command_guide/intro_adhoc.html
|
||||
|
||||
- hosts: all
|
||||
become: yes # Optional privilege escalation
|
||||
|
||||
|
@ -19,7 +26,9 @@
|
|||
#- include_role:
|
||||
# name: 0-init
|
||||
|
||||
# 2024-05-16: ansible-core 2.17 RC2 still hasn't fixed this, as they migrate from Python's crypt library to passlib:
|
||||
# 2024-08-15: Still not working with ansible-core 2.17.3 -- instead of
|
||||
# migrating from Python's crypt library to passlib, Ansible is deprecating:
|
||||
# https://github.com/ansible/ansible/issues/81949
|
||||
# https://github.com/iiab/iiab/blob/485a619bfa082716ec848b5b34893dd3046175a8/roles/cups/tasks/install.yml#L70-L78
|
||||
#- debug:
|
||||
# msg: "{{ 'changeme' | password_hash('sha512') }}"
|
||||
|
|
Loading…
Reference in a new issue