Ignore:
Timestamp:
Jun 7, 2017, 3:03:17 AM (4 years ago)
Author:
Bruno Cornec
Message:

Many updates to MR setup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/ansible/roles/system/tasks/main.yml

    r3657 r3667  
    22
    33- name: Check that IP address is setup
    4   copy: src=templates/ifcfg-enp2s0f0 dest=/etc/sysconfig/network-scripts/ifcfg-enp2s0f0 owner=root group=root mode=0600 backup=yes
     4  template: src=templates/ifcfg-enp2s0f0 dest=/etc/sysconfig/network-scripts/ifcfg-enp2s0f0 owner=root group=root mode=0600 backup=yes
    55  tags: system
    66
    77- name: Check that GW is setup
    8   copy: src=templates/network dest=/etc/sysconfig/network owner=root group=root mode=0600 backup=yes
     8  template: src=templates/network dest=/etc/sysconfig/network owner=root group=root mode=0600 backup=yes
    99  tags: system
    1010
     
    2828  tags: system
    2929
    30 - name: Ensure the fwadmin group exists
    31   group: name=fwadmin state=present
     30- name: Ensure the groups exists
     31  group: name={{ item }} state=present
    3232  tags: system
     33  with_items:
     34    - fwadmin
     35    - bruno
    3336
    34 - name: Ensure the fwadmin account exists
    35   user: name=fwadmin state=present group=fwadmin home=/home/fwadmin move_home=yes
     37- name: Ensure the accounts exists
     38  user: name={{ item }} state=present group={{ item }} home=/home/{{ item }} move_home=yes
    3639  tags: system
     40  with_items:
     41    - fwadmin
     42    - bruno
    3743
    38 - name: Copy public for fwadmin access
    39   lineinfile: destfile=/home/{{ item }}/.ssh/authorized_keys state=present line='{{ sshkey }}' owner={{item }} group={{item }} mode=0600 backup=yes
     44- name: Copy special keys for remote access (git...)
     45  copy: src=/users/bruno/prj/musique-ancienne.org/mondorescue.org/{{ item.f }} dest=/home/bruno/{{ item.f }} mode={{ item.m }} backup=yes owner=bruno group=bruno
     46  with_items:
     47    - { f: .ssh, m: 700 }
     48    - { f: .ssh/id_rsa, m: 600 }
     49    - { f: .ssh/id_rsa.pub, m: 644 }
     50
     51- name: Copy public keys for access
     52  lineinfile: destfile=/home/{{ item }}/.ssh/authorized_keys state=present line='{{ sshkey }}' mode=0600 backup=yes owner={{ item }} group={{ item }}
    4053  with_items:
    4154    - fwadmin
     
    5265
    5366- name: Check that sshutout is configured
    54   copy: src=templates/sshutout.conf dest=/etc/sshtout.conf owner=root group=root mode=0600 backup=yes
     67  template: src=templates/sshutout.conf dest=/etc/sshutout.conf owner=root group=root mode=0600 backup=yes
    5568  notify:
    5669    - restart sshutout
Note: See TracChangeset for help on using the changeset viewer.