Uniwa 2020 ask Security
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.

113 lines
1.9 KiB

4 years ago
---
- 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'
# make another directory
# - name: make another dir for data
# become: true
# file:
# path: "/home/docker/my_dir"
# state: directory
# owner: docker
# group: docker
# mode: '0777'
# pare google.com
# - 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
# mk dir
# - name: remove dir
# become: yes
# become_user: "{{ user }}"
# command: rmdir new_dir
# ignore_errors: yes
# register: rmvdir
# - name: ls rmvdir
# debug: var=rmvdir.stdout_lines
# ls -al
- name: ls -al
become: yes
become_user: "{{ user }}"
command: ls -al #/etc
ignore_errors: yes
register: config
- name: ls config
debug: var=config.stdout_lines
# netstat -antlupe
# - name: netstat
# become: yes
# become_user: "{{ user }}"
# command: netstat -antlupe
# ignore_errors: yes
# register: ant
# - name: ls ant
# debug: var=ant.stdout_lines
# install hping3 to all
# - name: install hping3 to all
# become: yes
# become_user: "{{ user }}"
# command: sudo apt install hping3 -y
# ignore_errors: yes
# register: install_hp3
# - name: ls install_hp3
# debug: var=install_hp3.stdout_lines
- name: Refresh connection
meta: clear_host_errors