├── tasks ├── packages.yml ├── cron.yml ├── users.yml └── files │ └── sudoers_ansible ├── README.md └── local.yml /tasks/packages.yml: -------------------------------------------------------------------------------- 1 | - name: Install packages 2 | apt: 3 | name: 4 | - htop 5 | - mc 6 | - tmux 7 | -------------------------------------------------------------------------------- /tasks/cron.yml: -------------------------------------------------------------------------------- 1 | - name: install cron job (ansible-pull) 2 | cron: 3 | user: ansible 4 | name: "ansible provision" 5 | minute: "*/10" 6 | job: "/usr/bin/ansible-pull -o -U https://github.com/jlacroix82/ansible_pull_tutorial.git > /dev/null" 7 | -------------------------------------------------------------------------------- /tasks/users.yml: -------------------------------------------------------------------------------- 1 | - name: create ansible user 2 | user: 3 | name: ansible 4 | system: yes 5 | 6 | - name: copy sudoers_ansible 7 | copy: 8 | src: files/sudoers_ansible 9 | dest: /etc/sudoers.d/ansible 10 | owner: root 11 | group: root 12 | mode: 0440 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ansible Pull tutorial 2 | 3 | ![Ansible Logo](https://www.learnlinux.tv/wp-content/uploads/2020/12/ansible-e1607524003363.png) 4 | 5 | This repository was used for the Ansible Pull tutorial from the LearnLinux.TV YouTube channel. 6 | 7 | You can view the original video for this repository [here](https://youtu.be/sn1HQq_GFNE). 8 | -------------------------------------------------------------------------------- /local.yml: -------------------------------------------------------------------------------- 1 | - hosts: localhost 2 | connection: local 3 | become: true 4 | 5 | pre_tasks: 6 | - name: update repositories 7 | apt: 8 | update_cache: yes 9 | changed_when: False 10 | 11 | tasks: 12 | - include: tasks/users.yml 13 | - include: tasks/cron.yml 14 | - include: tasks/packages.yml 15 | -------------------------------------------------------------------------------- /tasks/files/sudoers_ansible: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 35616332396531633763373466333266316563303639333235633136663564366636633534656636 3 | 3663613036666233643839383037636466313136353366310a356331396136363761373031646463 4 | 38643833313539656337376364653735396661633038633764383239656135333166663631316336 5 | 6461626266626231390a626531373131333863323364393730363365663266353639326438393363 6 | 32383230393639323163313239663366323539326661396464633132613266383762303965326337 7 | 3436613134326530306632653836613736346533363033656166 8 | --------------------------------------------------------------------------------