test
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
|이름|상태 요약|상세 보기|
|
||||
|---|---|---|
|
||||
|cmoa-master-1|취약|http://10.10.43.42:8080/cmoa-master-1.txt|
|
||||
|
||||
@@ -17,3 +17,11 @@
|
||||
dest: "{{ playbook_dir }}/README.md"
|
||||
delegate_to: 127.0.0.1
|
||||
when: "'nas' in group_names"
|
||||
|
||||
- name: git push
|
||||
shell: |
|
||||
git add .
|
||||
git commit -m "test"
|
||||
git push
|
||||
delegate_to: 127.0.0.1
|
||||
when: "'nas' in group_names"
|
||||
@@ -3,7 +3,6 @@
|
||||
file:
|
||||
path: ~/checklist/
|
||||
state: directory
|
||||
become: false
|
||||
delegate_to: 127.0.0.1
|
||||
when: "'nas' in group_names"
|
||||
|
||||
@@ -18,11 +17,12 @@
|
||||
dest: /tmp/ubuntu.sh
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Start Security Check Script
|
||||
- name: Start Security Check Script (become -> true)
|
||||
shell: |
|
||||
chdir
|
||||
bash /tmp/ubuntu.sh
|
||||
rm -rf /tmp/ubuntu.sh
|
||||
become: true
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Copy Result File to Local
|
||||
@@ -32,16 +32,16 @@
|
||||
flat: yes
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Delete Result File
|
||||
- name: Delete Result File (become -> true)
|
||||
file:
|
||||
path: "/tmp/{{ ansible_hostname }}.txt"
|
||||
state: absent
|
||||
become: true
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Find Copy File Name
|
||||
shell: ls -l ~/checklist/ | awk 'NR>1 {print $9}'
|
||||
register: copy_file
|
||||
become: false
|
||||
delegate_to: 127.0.0.1
|
||||
when: "'nas' in group_names"
|
||||
|
||||
@@ -56,10 +56,9 @@
|
||||
with_items: "{{ copy_file.stdout_lines }}"
|
||||
when: "'nas' in group_names"
|
||||
|
||||
- name: Delete Result File
|
||||
- name: Delete Result File (become -> true)
|
||||
file:
|
||||
path: "~/checklist/"
|
||||
state: absent
|
||||
become: false
|
||||
delegate_to: 127.0.0.1
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
when: "'nas' in group_names"
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- hosts: all
|
||||
become: true
|
||||
become: false
|
||||
gather_facts: true
|
||||
vars:
|
||||
user: byeonjeonghun
|
||||
|
||||
Reference in New Issue
Block a user