-
Notifications
You must be signed in to change notification settings - Fork 0
/
secound.yml
52 lines (47 loc) · 1.18 KB
/
secound.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
- hosts: all
vars_prompt:
- name: dvd_dir
private: no
prompt: "enter dvd mount point"
tasks:
- file:
state: directory
path: "{{ dvd_dir }}"
- mount:
src: "/dev/cdrom"
path: "{{ dvd_dir }}"
state: mounted
fstype: "iso9660"
- yum_repository:
baseurl: "{{ dvd_dir }}/AppStream"
name: "mydvd1"
description: "my dvd1 for pakage"
gpgcheck: no
- yum_repository:
baseurl: "{{ dvd_dir }}/BaseOS"
name: "mydvd2"
description: "my dvd2 for pakage"
gpgcheck: no
- package:
name: "httpd"
state: present
- file:
state: directory
path: "/var/www/suyog"
- copy:
src: "/root/ansible/playbook/new.conf"
dest: "/etc/httpd/conf.d/new.conf"
- copy:
dest: "/var/www/suyog/index.html"
content: "This is my web site\n"
- name: "Restarting httpd service"
shell: "/usr/sbin/httpd"
register: startoutput
changed_when: "'already running' not in startoutput.stdout"
- debug:
msg: "{{startoutput.stdout}}"
- firewalld:
port: "8080/tcp"
state: enabled
permanent: yes
immediate: yes