What do you want to save?
Add Code snippet
New code examples
-
-
Other 2021-11-16 13:02:13
import vs include command in ansible
PLAY [localhost] ************************************************************************************** TASK [debug] ****************************************************************************************** ok: [localhost] => { "msg": &... Add solution -
-
Other 2021-10-28 04:11:07
ansible playbook webserver
# Configure ansible.cfg and hosts first ansible webserver -m package -a "name=httpd state=present" ansible webserver -m copy -a "src=~/index.html dest=/var/www/html/" ansible webserver -m service -a "name=httpd state=started&qu... Add solution -
Other 2021-10-21 09:10:04
jinja2 templating with ansible
# Great doc if you are looking to learn about dynamic variable creation # from a template in Ansible https://docs.ansible.com/ansible/latest/user_guide/playbooks_templating.html # Also if you don't use lookup plugins with Ansible you should! They will # ... Add solution -
Shell/Bash 2021-10-05 21:26:03
ansible only disable service if installed
- shell: dpkg-query -W 'avahi' ignore_errors: True register: is_avahi when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' - shell: rpm -q 'avahi' ignore_errors: True register: is__avahi when: ansible_distribution == 'Ce... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5