Differences between revisions 3 and 4
Revision 3 as of 2020-03-06 18:12:41
Size: 522
Editor: Sciuro
Comment:
Revision 4 as of 2020-03-06 21:33:48
Size: 687
Editor: Sciuro
Comment:
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:
Install a package
{{{
- name: Install Postgres SQL server
  package:
    name: postgresql96-server
    state: latest
  tags: postgres,postgres_install
}}}

Description

Ansible is used for configuration management. It's very easy and can save you a lot of time. Here are some snippets I use for my configuration.

Facts

Getting all the facts of a server.

ansible -i config/hosts server -m setup

Configuration

Directories

Install a package

- name: Install Postgres SQL server
  package:
    name: postgresql96-server
    state: latest
  tags: postgres,postgres_install

Make a directory

- name: Creates directory
  file:
    path: /path/www
    state: directory
    owner: www-data
    group: www-data
    mode: 0775
    recurse: yes

Howto/Ansible (last edited 2021-06-15 09:48:35 by Burathar)