ansible-pull looks good

This commit is contained in:
ubergeek 2018-12-21 21:14:32 -05:00
parent f8ed6970e4
commit d56f93997d
6 changed files with 77 additions and 62 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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