LoginSignup
1
1

More than 1 year has passed since last update.

Ansible で mod_dosdetector-fork をインストール

Last updated at Posted at 2018-10-13

Ansible で mod_dosdetector-fork をインストールするサンプルです。

defaults/main.yml
---
- ansible.builtin.set_fact:
    git_clone_dir: "{{ temp_dir }}/mod_dosdetector"

- name: Install dependences.
  ansible.builtin.yum:
    name: "{{ dependencies }}"
    state: present

- name: Clone remote Git repository.
  ansible.builtin.git:
    repo: "{{ git_repository }}"
    dest: "{{ git_clone_dir }}"

- name: Replace apxs path in Makefile.
  ansible.builtin.replace:
    dest: "{{ git_clone_dir }}/Makefile"
    regexp: APXS=.*
    replace: "APXS={{ apxs_path }}"

- name: Make mod_dosdetector.
  community.general.make:
    chdir: "{{ git_clone_dir }}"

- name: Install mod_dosdetector.
  community.general.make:
    chdir: "{{ git_clone_dir }}"
    target: install

- name: Delete Git clone directory.
  ansible.builtin.file:
    path: "{{ git_clone_dir }}"
    state: absent
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1