You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
1017 B

---
- hosts: service
remote_user: docker
gather_facts: no
vars:
user: "docker"
tasks:
# -----------------
# make directory
# -----------------
- name: make dir for data
become: true
file:
path: "/var/lab/playground/playground-readmongo"
state: directory
owner: docker
group: docker
mode: '0777'
- name: google.com
become: yes
become_user: "{{ user }}"
command: curl http://www.google.com
ignore_errors: yes
register: configwww
- name: ls configwww
debug: var=configwww.stdout_lines
# - name: ls -al /var/lab/playground/playground-readmongo/
# become: yes
# become_user: "{{ user }}"
# #command: ls -al /var/lab/playground/playground-readmongo
# command: netstat -antlupe
# ignore_errors: yes
# register: config
#
# - name: ls config
# debug: var=config.stdout_lines
#
# - name: Refresh connection
# meta: clear_host_errors
#