Files
ipcheck_ansible/roles/ipcheck/tasks/main.yml
2023-07-03 16:49:17 +09:00

50 lines
918 B
YAML

---
- name: git clone dir delete
file:
path: /home/jh
state: absent
- name: git clone dir create
file:
path: /home/jh
state: directory
- name: git clone ipcheck.sh
git:
repo: https://{{ user }}:{{ token }}@github.com/ByeonJungHun/IP-Check-List.git
dest: /home/jh
single_branch: yes
version: main
- name: ipcheck shell start
shell: sh /home/jh/ipcheck.sh
args:
chdir: /home/jh
- name: git add task
shell: git add .
args:
chdir: /home/jh
- name: git config
shell: |
git config user.email "sa_8001@ex-em.com"
git config user.id "byeonjunghun"
args:
chdir: /home/jh
#- name: git config id
# shell: git config user.id "byeonjunghun"
# args:
# chdir: /home/jh
- name: git commit task
shell: git commit -m "IP Check List Update"
args:
chdir: /home/jh
- name: git push task
shell: git push -u origin main
args:
chdir: /home/jh