Browse Source

fix hosts

python3
Andrea Cimbalo 7 years ago
parent
commit
0d01033f9d
8 changed files with 13 additions and 20 deletions
  1. +0
    -1
      .gitignore
  2. +1
    -5
      ansible.cfg
  3. +2
    -2
      destroy_container.yaml
  4. +1
    -1
      firewall.yaml
  5. +4
    -8
      hosts
  6. +2
    -2
      roles/dns_record/tasks/main.yaml
  7. +1
    -1
      roles/icinga2/tasks/main.yaml
  8. +2
    -0
      roles/reverse_proxy/tasks/main.yaml

+ 0
- 1
.gitignore View File

@ -1,5 +1,4 @@
group_vars/all.yaml
inventory
*.retry
*.swp
*.swo


+ 1
- 5
ansible.cfg View File

@ -1,10 +1,6 @@
[defaults]
#connection_plugins = ./
connection_plugins = ./
#filter_plugins = ./filter_plugin
#[ssh_connection]
#ssh_args = -F ./ssh_config -o ControlMaster=auto -o ControlPersist=30m
#control_path = ~/.ssh/ansible-%%r@%%h:%%p
inventory = hosts

+ 2
- 2
destroy_container.yaml View File

@ -1,5 +1,5 @@
---
- hosts: local
- hosts: localhost
tasks:
- fail:
msg: "please define a vm name with --extra-vars vm=vm_name"
@ -16,7 +16,7 @@
- debug:
msg: "{{ ansible_hostname }} cointains a vm named {{ vm }}"
when: '"exists" in container_exists'
when: '"exists" in container_exists and container_exists.exists'
- hosts: '{{ lxc_host }}'
vars_prompt:


+ 1
- 1
firewall.yaml View File

@ -1,5 +1,5 @@
---
- hosts: gandalf2
- hosts: gandalf
roles:
- role: openvpn
- role: ssh_server


+ 4
- 8
hosts View File

@ -1,3 +1,5 @@
localhost ansible_connection=local
gandalf ansible_host=10.150.42.1 ansible_user=root
biff ansible_host=10.150.40.4 ansible_user=root
emmett ansible_host=10.150.40.5 ansible_user=root
@ -15,18 +17,12 @@ login ansible_host=10.150.42.100 ansible_user=root
mail ansible_host=10.150.42.36 ansible_user=root
matrix ansible_host=10.150.42.26 ansible_user=root
media ansible_host=10.150.42.104 ansible_user=root
projects ansible_host=10.150.42.12 ansible_user=root
projects2 ansible_host=10.150.42.12 ansible_user=root
status ansible_host=10.150.42.103 ansible_user=root
users ansible_host=10.150.42.18 ansible_user=root
webmail ansible_host=10.150.42.14 ansible_user=root
wiki ansible_host=10.150.42.16 ansible_user=root
enis ansible_host=192.168.0.101 ansible_user=root
kilil ansible_host=10.150.42.38 ansible_user=root
netjson ansible_host=10.150.42.40 ansible_user=root
prosody ansible_host=10.150.42.27 ansible_user=root
rtfm ansible_host=10.150.42.35 ansible_user=root
seafile ansible_host=10.150.42.25 ansible_user=root
management_gateway ansible_host=10.150.40.1 ansible_user=root
vm_gateway ansible_host=10.150.42.1 ansible_user=root
reverse_proxy ansible_host=10.150.42.1 ansible_user=root


+ 2
- 2
roles/dns_record/tasks/main.yaml View File

@ -3,10 +3,10 @@
dest: '/etc/hosts'
line: '{{ ansible_default_ipv4.address }} {{ ansible_hostname }}'
regexp: '^\s*\S* {{ ansible_hostname }}'
delegate_to: gandalf2
delegate_to: gandalf
register: hosts
- name: dnsmasq force hosts reload
command: "killall -HUP dnsmasq"
delegate_to: gandalf2
delegate_to: gandalf
when: hosts.changed

+ 1
- 1
roles/icinga2/tasks/main.yaml View File

@ -93,7 +93,7 @@
- name: create icinga2 hosts directory
file:
path: {{ item }}
path: "{{ item }}"
state: directory
owner: icinga2
group: icinga2


+ 2
- 0
roles/reverse_proxy/tasks/main.yaml View File

@ -56,6 +56,8 @@
state: directory
dest: "/etc/nginx/upstream.conf.d"
delegate_to: reverse_proxy
notify: reload nginx
- name: Upload mappings to reverse proxy
template:


Loading…
Cancel
Save