Difference between revisions of "Package (Ansible module)"
Jump to navigation
Jump to search
(Created page with "#!/usr/bin/env ansible-playbook - hosts: YOUR_HOSTNAME remote_user: YOUR_REMOTEUSER become: yes connection: ssh tasks: - name: Install and start as service sys...") |
|||
Line 1: | Line 1: | ||
+ | |||
+ | <pre> | ||
#!/usr/bin/env ansible-playbook | #!/usr/bin/env ansible-playbook | ||
Line 25: | Line 27: | ||
enabled: yes | enabled: yes | ||
when: ansible_distribution == 'Ubuntu' | when: ansible_distribution == 'Ubuntu' | ||
+ | </pre> | ||
== See also == | == See also == | ||
* {{Ansible modules}} | * {{Ansible modules}} |
Revision as of 09:14, 29 April 2020
#!/usr/bin/env ansible-playbook - hosts: YOUR_HOSTNAME remote_user: YOUR_REMOTEUSER become: yes connection: ssh tasks: - name: Install and start as service sysstat for Ubuntu block: - package: name: sysstat state: present - lineinfile: path: /etc/default/sysstat state: present backrefs: yes regexp: '^ENABLED="false"' line: 'ENABLED="true"' - service: name: sysstat state: started enabled: yes when: ansible_distribution == 'Ubuntu'
See also
- Ansible modules:
gather_facts, set_fact
,ansible.builtin.file
,lineinfile
,stat
,group
,mount
,git:
,package:
,command:
,shell:
,raw:
,template:
,register:
,user:
, Ansible playbooks examples,tasks:
,lineinfile, blockinfile:
,shell:
,command:
,raw:
,ansible.builtin.file, service:, aws.ecs_taskdefinition, aws.asg, docker_container, kubernetes.core.k8s
,community.
,include_tasks
Advertising: