2021-02-09 17:05:00 +01:00
|
|
|
---
|
|
|
|
# file: defaults/main.yml
|
|
|
|
|
2021-06-16 13:19:52 +02:00
|
|
|
# cloud-init config
|
2021-02-09 17:05:00 +01:00
|
|
|
hosts_cloudinit_config:
|
|
|
|
users:
|
|
|
|
- default
|
|
|
|
disable_root: true
|
|
|
|
mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
|
|
|
|
resize_rootfs_tmp: /dev
|
|
|
|
ssh_pwauth: 0
|
|
|
|
preserve_hostname: false
|
|
|
|
datasource_list:
|
|
|
|
- Ec2
|
|
|
|
datasource:
|
|
|
|
Ec2:
|
|
|
|
metadata_urls:
|
|
|
|
- 'http://169.254.169.254'
|
|
|
|
timeout: 5
|
|
|
|
max_wait: 10
|
|
|
|
cloud_init_modules:
|
|
|
|
- migrator
|
|
|
|
- seed_random
|
|
|
|
- bootcmd
|
|
|
|
- write-files
|
|
|
|
- growpart
|
|
|
|
- resizefs
|
|
|
|
- disk_setup
|
|
|
|
- mounts
|
|
|
|
- set_hostname
|
|
|
|
- update_hostname
|
|
|
|
- update_etc_hosts
|
|
|
|
- resolv_conf
|
|
|
|
- ca-certs
|
|
|
|
- rsyslog
|
|
|
|
- users-groups
|
|
|
|
- ssh
|
|
|
|
cloud_config_modules:
|
|
|
|
- ssh-import-id
|
|
|
|
- locale
|
|
|
|
- set-passwords
|
|
|
|
- apk-configure
|
|
|
|
- ntp
|
|
|
|
- timezone
|
|
|
|
- disable-ec2-metadata
|
|
|
|
- runcmd
|
|
|
|
cloud_final_modules:
|
|
|
|
- package-update-upgrade-install
|
|
|
|
- puppet
|
|
|
|
- chef
|
|
|
|
- mcollective
|
|
|
|
- salt-minion
|
|
|
|
- rightscale_userdata
|
|
|
|
- scripts-vendor
|
|
|
|
- scripts-per-once
|
|
|
|
- scripts-per-boot
|
|
|
|
- scripts-per-instance
|
|
|
|
- scripts-user
|
|
|
|
- ssh-authkey-fingerprints
|
|
|
|
- keys-to-console
|
|
|
|
- phone-home
|
|
|
|
- final-message
|
|
|
|
- power-state-change
|
|
|
|
system_info:
|
|
|
|
distro: alpine
|
|
|
|
default_user:
|
|
|
|
name: alpine
|
|
|
|
lock_passwd: True
|
|
|
|
gecos: alpine Cloud User
|
|
|
|
groups: [adm, sudo]
|
|
|
|
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
|
|
|
|
shell: /bin/ash
|
|
|
|
paths:
|
|
|
|
cloud_dir: /var/lib/cloud/
|
|
|
|
templates_dir: /etc/cloud/templates/
|
|
|
|
ssh_svcname: sshd
|
|
|
|
|
2021-06-16 13:19:52 +02:00
|
|
|
# enable cloud-init
|
2021-07-14 21:38:30 +02:00
|
|
|
hosts_cloudinit_enable: false
|
2021-06-16 13:19:52 +02:00
|
|
|
|
2021-07-15 00:58:24 +02:00
|
|
|
# git repositories to clone
|
|
|
|
hosts_git_repositories: []
|
|
|
|
|
2021-07-14 21:38:30 +02:00
|
|
|
# packages to install/remove
|
2021-06-16 13:19:52 +02:00
|
|
|
hosts_packages: []
|
|
|
|
|
|
|
|
# packages common to all distributions
|
|
|
|
hosts_packages_common:
|
|
|
|
- { "name": "bash", "state": "present" }
|
|
|
|
- { "name": "ca-certificates", "state": "present" }
|
|
|
|
- { "name": "curl", "state": "present" }
|
|
|
|
- { "name": "git", "state": "present" }
|
|
|
|
- { "name": "htop", "state": "present" }
|
|
|
|
- { "name": "less", "state": "present" }
|
|
|
|
- { "name": "lsof", "state": "present" }
|
|
|
|
- { "name": "make", "state": "present" }
|
|
|
|
- { "name": "rsync", "state": "present" }
|
|
|
|
- { "name": "screen", "state": "present" }
|
|
|
|
- { "name": "tmux", "state": "present" }
|
|
|
|
- { "name": "tzdata", "state": "present" }
|
|
|
|
|
|
|
|
# packages specific to a distribution
|
|
|
|
hosts_packages_distro: []
|
|
|
|
|
2021-07-14 21:38:30 +02:00
|
|
|
# services to enable/disable
|
|
|
|
hosts_services:
|
|
|
|
- { "name": "ansible", "state": "stopped", "enabled": "no" }
|
2022-06-22 10:02:09 +02:00
|
|
|
- { "name": "myos", "state": "stopped", "enabled": "no" }
|
2021-07-14 21:38:30 +02:00
|
|
|
- { "name": "zram", "state": "stopped", "enabled": "no" }
|
2021-06-16 13:19:52 +02:00
|
|
|
|
2021-07-14 21:38:30 +02:00
|
|
|
# list of urls to get public keys to add to ~/.ssh/authorized_keys
|
2021-06-16 13:19:52 +02:00
|
|
|
hosts_ssh_authorized_keys: "{{ lookup('env','ANSIBLE_SSH_AUTHORIZED_KEYS').split(' ') }}"
|
|
|
|
|
|
|
|
# hostname of myos-bastion to add in ~/.ssh/myos/config
|
|
|
|
hosts_ssh_bastion_hostname: "{{ lookup('env','ANSIBLE_SSH_BASTION_HOSTNAME') }}"
|
|
|
|
|
|
|
|
# username of myos-bastion to add in ~/.ssh/myos/config
|
|
|
|
hosts_ssh_bastion_username: "{{ lookup('env','ANSIBLE_SSH_BASTION_USERNAME') or ansible_user }}"
|
|
|
|
|
|
|
|
# ip range proxyfied through myos-bastion to add in ~/.ssh/myos/config
|
|
|
|
hosts_ssh_private_ip_range: "{{ lookup('env','ANSIBLE_SSH_PRIVATE_IP_RANGE') }}"
|
|
|
|
|
2021-07-14 21:38:30 +02:00
|
|
|
# list of SSH private keys to copy
|
2021-06-16 13:19:52 +02:00
|
|
|
hosts_ssh_private_keys: "{{ lookup('env','ANSIBLE_SSH_PRIVATE_KEYS').split(' ') }}"
|
|
|
|
|
2021-07-14 21:38:30 +02:00
|
|
|
# list of public hosts to add to known_hosts
|
2021-06-16 13:19:52 +02:00
|
|
|
hosts_ssh_public_hosts: "{{ lookup('env','ANSIBLE_SSH_PUBLIC_HOSTS').split(' ') }}"
|
|
|
|
|
|
|
|
# remote ssh user
|
|
|
|
hosts_ssh_username: "{{ lookup('env','ANSIBLE_SSH_USERNAME') or ansible_user }}"
|
|
|
|
|
2021-07-15 00:58:24 +02:00
|
|
|
# update hosts every day
|
|
|
|
hosts_update: false
|
|
|
|
|
|
|
|
# list of environment variables to add in ~/.myos
|
2021-06-16 13:19:52 +02:00
|
|
|
hosts_user_env: []
|
2021-07-14 21:38:30 +02:00
|
|
|
|
|
|
|
# run specific functions on user login
|
|
|
|
hosts_user_rc_enable: false
|
|
|
|
|
|
|
|
# list of rc functions to call at user connection
|
|
|
|
hosts_user_rc_functions:
|
|
|
|
- { "path": "10_prompt_set", "state": "touch" }
|
|
|
|
- { "path": "10_ps1_set", "state": "touch" }
|
|
|
|
- { "path": "30_pfetch", "state": "touch" }
|
|
|
|
- { "path": "40_ssh_add", "state": "touch" }
|
|
|
|
|