testing with FreeBSD on ec2

This commit is contained in:
Vincent V.d Kussen 2018-08-18 10:13:25 +02:00
parent c1ab857680
commit caa1e1fa65
4 changed files with 5 additions and 41 deletions

5
hosts
View file

@ -1,2 +1,3 @@
10.106.116.157 ssh_short_name=host1
10.106.116.139 ssh_short_name=host2
10.106.116.157 ssh_short_name=host1 ansible_user=root
10.106.116.139 ssh_short_name=host2 ansible_user=root
34.242.108.38 ssh_short_name=freebsd1 ansible_user=ec2-user ansible_python_interpreter=/usr/local/bin/python2.7

View file

@ -18,40 +18,3 @@
- "{{ users }}"
- keys
#- name: Check if user has ~/.ssh/config
# stat:
# path: "/home/{{ item.name }}/.ssh/config"
# with_items: "{{ users }}"
# register: sshconfig
#
#
#- name: Create ~/.ssh/config when absent
# file:
# path: "/home/{{ item.item.name }}/.ssh/config"
# owner: "{{ item.item.name }}"
# group: "{{ item.item.name }}"
# mode: 0600
# state: touch
# when: item.stat.exists == False
# with_items:
# - "{{ sshconfig.results }}"
# no_log: True
#
#- name: Configure ~/.ssh/config
# blockinfile:
# path: "/home/{{ item.name }}/.ssh/config"
# owner: "{{ item.name }}"
# group: "{{ item.name }}"
# mode: 0600
# marker: "# {mark} ANSIBLE MANAGED BLOCK"
# content: |
# host {{ ansible_hostname }}
# hostname {{ ansible_hostname }}
# User {{ item.name }}
# RemoteForward /home/{{ item.name }}/.gnupg/S.gpg-agent $HOME/.gnupg/S.gpg-agent
# RemoteForward /home/{{ item.name }}/.gnupg/S.gpg-agent.ssh $HOME/.gnupg/S.gpg-agent.ssh
# ServerAliveInterval 10
# with_items:
# - "{{ users }}"

View file

@ -16,7 +16,7 @@
uid: "{{ item.uid | default(omit) }}"
shell: "{{ item.shell | default(default_shell) }}"
append: yes
no_log: True
no_log: True
with_items: "{{ users }}"

View file

@ -1,7 +1,7 @@
---
- name: Manage user configuration
hosts: all
remote_user: root
# remote_user: root
roles:
- users
- ssh-config