45.5.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow [ipaserver] server.idm.example.com
[ipaserver] server.idm.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow --- - name: Host absent hosts: ipaserver vars_files: - /home/user_name/MyPlaybooks/secret.yml tasks: - name: Host host01.idm.example.com absent ipahost: ipaadmin_password: "{{ ipaadmin_password }}" name: host01.idm.example.com updatedns: true state: absent
--- - name: Host absent hosts: ipaserver vars_files: - /home/user_name/MyPlaybooks/secret.yml tasks: - name: Host host01.idm.example.com absent ipahost: ipaadmin_password: "{{ ipaadmin_password }}" name: host01.idm.example.com updatedns: true state: absent
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ansible-playbook --vault-password-file=password_file -v -i path_to_inventory_directory/inventory.file path_to_playbooks_directory/ensure-host-absent.yml
$ ansible-playbook --vault-password-file=password_file -v -i path_to_inventory_directory/inventory.file path_to_playbooks_directory/ensure-host-absent.yml
注記
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ssh admin@server.idm.example.com
$ ssh admin@server.idm.example.com Password: [admin@server /]$
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ipa host-show host01.idm.example.com
$ ipa host-show host01.idm.example.com ipa: ERROR: host01.idm.example.com: host not found