Ansible Frescoplay
Ansible Frescoplay
Ansible Frescoplay
---
- name: Stop and Start ssh
service:
name: ssh
state: stopped
- name: Stop and Start ssh
service:
name: ssh
state: started
LOOPS:
loops
type the below in the defaults/mail.yml
---
mongo_packages:
- apache2
- sqlite3
- git
---
- name: Install mongodb
yum:
name: "{{ item }}"
state: present
with_items: "{{ mongo_packages }}"
touch simplefile.txt
---
- name: check destination
stat:
path: /home/user/test/simplefile.txt
register: p
- name: copy file if not exists
command: mv /projects/challenge/simplefile.txt /home/user/test
when: p.stat.exists == False
then run
ansible-playbook -i myhosts test.yml
ansible-playbook -i myhosts mainplaybook.yml
ansible-playbook -i myhosts master_playbook.yml