ansible-pull looks good
This commit is contained in:
parent
f8ed6970e4
commit
d56f93997d
|
@ -1,16 +1,13 @@
|
||||||
- name: Add ansible cron job
|
- name: Add ansible cron job
|
||||||
copy:
|
copy:
|
||||||
content: |
|
src: ../files/ansible-pull
|
||||||
#!/bin/bash
|
|
||||||
cd /var/thunix/ansible
|
|
||||||
git pull
|
|
||||||
ansible-playbook -i ./hosts ./site.yml -u root
|
|
||||||
dest: /etc/cron.hourly/ansible-pull
|
dest: /etc/cron.hourly/ansible-pull
|
||||||
owner: root
|
owner: root
|
||||||
|
mode: 744
|
||||||
|
|
||||||
- name: Adding ansible git repo locally
|
- name: Adding ansible git repo locally
|
||||||
git: https://tildegit.org/thunix/ansible.git
|
git:
|
||||||
repo: 'https://tildegit.org/thunix/www.git'
|
repo: 'https://tildegit.org/thunix/ansibe.git'
|
||||||
dest: /var/thunix/ansible
|
dest: /var/thunix/ansible
|
||||||
|
|
||||||
- name: adding deploy key
|
- name: adding deploy key
|
||||||
|
@ -19,7 +16,7 @@
|
||||||
state: present
|
state: present
|
||||||
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC2ZFqUDHL4KTkjqaNdWLGVPyHfz7uBh7j48uab1ywbOScDIvW/6Lhnxg41J48o0IGASyT0ijwBX6Se/IkKM6vHVJ5H7wEIZ1YL1351ytacZ7/zsh/LWvGi3YkMblboN6SesXwXnvih9dWWMpW/ifz10IeOw7cB5OjIomIYTre3J5f4WmqYCB4NxDHAVSszv62wZrnpb6QrQOG4YvbxvhynHEJN2OmvMPufIjICZap/fGd3BtFafWSjCL4ZbBnNK9TlwGw6LFeJrHHoL77prwl/tIFr+XQg1FnzNAbhT0QEgF/7LasrjrgjK06yHWEOw0eWDKRAAHvXJ9ESwP6NWi9CBkV2gVBDzJUyKREPQNg+LZ5xNQoP9x4bSglhnPSoE8YYLIkgApaUVhTuWbBB+vtsEgK5HI9X63jCfYUpRwOXw+S6YMI8wo+ZFMLY1uQi66/3w+nyg0jp/+3VVUK6wEv5f+7iO5KVaLM1KY9GYwZmixJgOukJzC9MT3vHF60+fZFAZMB5iTjhBGYdHpGPDpOyICYuo7uKpmSPa72GfuSE6oZ6ighJyQEONWIKF+fr0ngb1/N7f6yns1qyJ1rd9PyQ08moSsbBeVCmR963rmv+RrYA756KXxLrsH4UOtVQFO/8vwjTkigXf2Xc+85YTrXJV+w5xS6RQUwuoc+GrerJsw=="
|
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC2ZFqUDHL4KTkjqaNdWLGVPyHfz7uBh7j48uab1ywbOScDIvW/6Lhnxg41J48o0IGASyT0ijwBX6Se/IkKM6vHVJ5H7wEIZ1YL1351ytacZ7/zsh/LWvGi3YkMblboN6SesXwXnvih9dWWMpW/ifz10IeOw7cB5OjIomIYTre3J5f4WmqYCB4NxDHAVSszv62wZrnpb6QrQOG4YvbxvhynHEJN2OmvMPufIjICZap/fGd3BtFafWSjCL4ZbBnNK9TlwGw6LFeJrHHoL77prwl/tIFr+XQg1FnzNAbhT0QEgF/7LasrjrgjK06yHWEOw0eWDKRAAHvXJ9ESwP6NWi9CBkV2gVBDzJUyKREPQNg+LZ5xNQoP9x4bSglhnPSoE8YYLIkgApaUVhTuWbBB+vtsEgK5HI9X63jCfYUpRwOXw+S6YMI8wo+ZFMLY1uQi66/3w+nyg0jp/+3VVUK6wEv5f+7iO5KVaLM1KY9GYwZmixJgOukJzC9MT3vHF60+fZFAZMB5iTjhBGYdHpGPDpOyICYuo7uKpmSPa72GfuSE6oZ6ighJyQEONWIKF+fr0ngb1/N7f6yns1qyJ1rd9PyQ08moSsbBeVCmR963rmv+RrYA756KXxLrsH4UOtVQFO/8vwjTkigXf2Xc+85YTrXJV+w5xS6RQUwuoc+GrerJsw=="
|
||||||
|
|
||||||
- name: adding deploy key
|
- name: adding deploy key
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: root
|
user: root
|
||||||
state: present
|
state: present
|
||||||
|
|
|
@ -6,3 +6,4 @@
|
||||||
- include: resolv.yml
|
- include: resolv.yml
|
||||||
- include: sshd.yml
|
- include: sshd.yml
|
||||||
- include: motd.yml
|
- include: motd.yml
|
||||||
|
- include: ansible-pull.yml
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
# Install our baseline packages for all machines, irrespective of what role they might have
|
# Install our baseline packages for all machines, irrespective of what role they might have
|
||||||
---
|
---
|
||||||
- name: Install baseline packages
|
- name: Install baseline packages
|
||||||
apt: name={{ item }} state=present
|
apt:
|
||||||
with_items:
|
name: "{{ packages }}"
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
- aptitude
|
- aptitude
|
||||||
- git
|
- git
|
||||||
- python
|
- python
|
||||||
- man
|
- man
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
name: sudo
|
name: sudo
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Allow 'sudo' group to have passwordless sudo
|
- name: Allow 'sudo' group to have passwordless sudo
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/sudoers
|
dest: /etc/sudoers
|
||||||
state: present
|
state: present
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
# Install our baseline packages for all machines, irrespective of what role they might have
|
# Install our baseline packages for all machines, irrespective of what role they might have
|
||||||
---
|
---
|
||||||
- name: Install baseline packages
|
- name: Install baseline packages
|
||||||
apt: name={{ item }} state=present
|
apt:
|
||||||
with_items:
|
name: "{{ packages }}"
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
- vim
|
- vim
|
||||||
- alpine
|
- alpine
|
||||||
- weechat
|
- weechat
|
||||||
|
@ -14,8 +18,11 @@
|
||||||
- python-pip
|
- python-pip
|
||||||
- cowsay
|
- cowsay
|
||||||
- byobu
|
- byobu
|
||||||
|
- bsdgames
|
||||||
|
- emacs
|
||||||
|
- elinks
|
||||||
|
|
||||||
# Install (Bottle) python package.
|
# Install ansible python package, because it's the latest
|
||||||
- name: Install ansible
|
- name: Install ansible
|
||||||
pip:
|
pip:
|
||||||
name: ansible
|
name: ansible
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
# Install apache and accoutrements www, irrespective of what role they might have
|
# Install apache and accoutrements www, irrespective of what role they might have
|
||||||
---
|
---
|
||||||
- name: Install packages
|
- name: Install packages for webserver
|
||||||
apt: name={{ item }} state=present
|
apt:
|
||||||
with_items:
|
name: "{{ packages }}"
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
- apache2
|
- apache2
|
||||||
- mariadb-server
|
- mariadb-server
|
||||||
- mariadb-client
|
- mariadb-client
|
||||||
|
@ -23,3 +27,4 @@
|
||||||
- php7.0-tidy
|
- php7.0-tidy
|
||||||
- php7.0-xmlrpc
|
- php7.0-xmlrpc
|
||||||
- php7.0-xsl
|
- php7.0-xsl
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue