Translating a server-environment Debian-apt Ansible playbook to an Arch Linux one












0














I have the following Ansible playbook to install a simple, 99% all-default server environment (AMPS - Apache, MySQL, PHP, Ssmtp) on distros implementing apt.



Say I change all apt commands to packman and make some minor syntax changes here and there. Can I still use it with all its packages and commands on Arch Linux?



---

- hosts: all
become: yes
become_user: root
tasks:

- name: Update apt package-indexes cache
apt:
update_cache=yes

- name: Install external basics
apt: state=latest
with-items:
- ufw
- sshguard
- unattended-upgrades
- wget
- curl
- git
- zip
- unzip
- tree

- name: Setup firewall with ufw
ufw:
rule: allow
port: 22,25,80,443

- name: Establish a LAPMS (Linux, Apache, PHP, MySQL, SSMTP) server environment
apt: state=latest
with-items:
- apache2 # Web server
- python-certbot-apache
- php
- php-mysql # MySQL server
- php-cli
- php-curl
- php-mbstring
- php-mcrypt
- php-gd
- ssmtp # Email server
- phpmyadmin

- name: Install Composer
get_url:
url: https://getcomposer.org/installer
dest: /tmp/composer-setup.php
command: php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer

- name: Configure PHP variables
shell: |
cat <<-EOF > /etc/php*/conf.d/local.ini
upload_max_filesize = 2000M
post_max_size = 2000M
EOF
args:
executable: /bin/bash

- apache2_module:
state: present
name: http2

- apache2_module:
state: present
name: deflate

- apache2_module:
state: present
name: expires









share|improve this question






















  • No, because the package names are different on Arch, as are the commands for pacman.
    – jasonwryan
    32 mins ago










  • Also, if you have never used Arch before, it is a terrible idea to think you can set up a server with a configuration manager.
    – jasonwryan
    30 mins ago










  • @jasonwryan it is extremely important for me to ask you if you will say the same for openSUSE, Alpine or any other "fully rolling release" distro?
    – JohnDoea
    16 mins ago










  • I know nothing about how those other distros work, but I imagine that the same would apply. They have their own package managers and naming conventions.
    – jasonwryan
    8 mins ago










  • I see. Well, seems like staying with latest Debian stable and a good-written Ansible playbook will the stablest I could get for say 15-20 years. After all, who knows what technologies will be available then; maybe by then PaaS services will be much cheaper (also 5 USD per machine like a cheap IaaS or maybe IaaS machines will have much better automation solutions than available now by 2018).
    – JohnDoea
    3 mins ago
















0














I have the following Ansible playbook to install a simple, 99% all-default server environment (AMPS - Apache, MySQL, PHP, Ssmtp) on distros implementing apt.



Say I change all apt commands to packman and make some minor syntax changes here and there. Can I still use it with all its packages and commands on Arch Linux?



---

- hosts: all
become: yes
become_user: root
tasks:

- name: Update apt package-indexes cache
apt:
update_cache=yes

- name: Install external basics
apt: state=latest
with-items:
- ufw
- sshguard
- unattended-upgrades
- wget
- curl
- git
- zip
- unzip
- tree

- name: Setup firewall with ufw
ufw:
rule: allow
port: 22,25,80,443

- name: Establish a LAPMS (Linux, Apache, PHP, MySQL, SSMTP) server environment
apt: state=latest
with-items:
- apache2 # Web server
- python-certbot-apache
- php
- php-mysql # MySQL server
- php-cli
- php-curl
- php-mbstring
- php-mcrypt
- php-gd
- ssmtp # Email server
- phpmyadmin

- name: Install Composer
get_url:
url: https://getcomposer.org/installer
dest: /tmp/composer-setup.php
command: php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer

- name: Configure PHP variables
shell: |
cat <<-EOF > /etc/php*/conf.d/local.ini
upload_max_filesize = 2000M
post_max_size = 2000M
EOF
args:
executable: /bin/bash

- apache2_module:
state: present
name: http2

- apache2_module:
state: present
name: deflate

- apache2_module:
state: present
name: expires









share|improve this question






















  • No, because the package names are different on Arch, as are the commands for pacman.
    – jasonwryan
    32 mins ago










  • Also, if you have never used Arch before, it is a terrible idea to think you can set up a server with a configuration manager.
    – jasonwryan
    30 mins ago










  • @jasonwryan it is extremely important for me to ask you if you will say the same for openSUSE, Alpine or any other "fully rolling release" distro?
    – JohnDoea
    16 mins ago










  • I know nothing about how those other distros work, but I imagine that the same would apply. They have their own package managers and naming conventions.
    – jasonwryan
    8 mins ago










  • I see. Well, seems like staying with latest Debian stable and a good-written Ansible playbook will the stablest I could get for say 15-20 years. After all, who knows what technologies will be available then; maybe by then PaaS services will be much cheaper (also 5 USD per machine like a cheap IaaS or maybe IaaS machines will have much better automation solutions than available now by 2018).
    – JohnDoea
    3 mins ago














0












0








0







I have the following Ansible playbook to install a simple, 99% all-default server environment (AMPS - Apache, MySQL, PHP, Ssmtp) on distros implementing apt.



Say I change all apt commands to packman and make some minor syntax changes here and there. Can I still use it with all its packages and commands on Arch Linux?



---

- hosts: all
become: yes
become_user: root
tasks:

- name: Update apt package-indexes cache
apt:
update_cache=yes

- name: Install external basics
apt: state=latest
with-items:
- ufw
- sshguard
- unattended-upgrades
- wget
- curl
- git
- zip
- unzip
- tree

- name: Setup firewall with ufw
ufw:
rule: allow
port: 22,25,80,443

- name: Establish a LAPMS (Linux, Apache, PHP, MySQL, SSMTP) server environment
apt: state=latest
with-items:
- apache2 # Web server
- python-certbot-apache
- php
- php-mysql # MySQL server
- php-cli
- php-curl
- php-mbstring
- php-mcrypt
- php-gd
- ssmtp # Email server
- phpmyadmin

- name: Install Composer
get_url:
url: https://getcomposer.org/installer
dest: /tmp/composer-setup.php
command: php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer

- name: Configure PHP variables
shell: |
cat <<-EOF > /etc/php*/conf.d/local.ini
upload_max_filesize = 2000M
post_max_size = 2000M
EOF
args:
executable: /bin/bash

- apache2_module:
state: present
name: http2

- apache2_module:
state: present
name: deflate

- apache2_module:
state: present
name: expires









share|improve this question













I have the following Ansible playbook to install a simple, 99% all-default server environment (AMPS - Apache, MySQL, PHP, Ssmtp) on distros implementing apt.



Say I change all apt commands to packman and make some minor syntax changes here and there. Can I still use it with all its packages and commands on Arch Linux?



---

- hosts: all
become: yes
become_user: root
tasks:

- name: Update apt package-indexes cache
apt:
update_cache=yes

- name: Install external basics
apt: state=latest
with-items:
- ufw
- sshguard
- unattended-upgrades
- wget
- curl
- git
- zip
- unzip
- tree

- name: Setup firewall with ufw
ufw:
rule: allow
port: 22,25,80,443

- name: Establish a LAPMS (Linux, Apache, PHP, MySQL, SSMTP) server environment
apt: state=latest
with-items:
- apache2 # Web server
- python-certbot-apache
- php
- php-mysql # MySQL server
- php-cli
- php-curl
- php-mbstring
- php-mcrypt
- php-gd
- ssmtp # Email server
- phpmyadmin

- name: Install Composer
get_url:
url: https://getcomposer.org/installer
dest: /tmp/composer-setup.php
command: php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer

- name: Configure PHP variables
shell: |
cat <<-EOF > /etc/php*/conf.d/local.ini
upload_max_filesize = 2000M
post_max_size = 2000M
EOF
args:
executable: /bin/bash

- apache2_module:
state: present
name: http2

- apache2_module:
state: present
name: deflate

- apache2_module:
state: present
name: expires






apt package-management apache-httpd ansible architecture






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 35 mins ago









JohnDoea

1291132




1291132












  • No, because the package names are different on Arch, as are the commands for pacman.
    – jasonwryan
    32 mins ago










  • Also, if you have never used Arch before, it is a terrible idea to think you can set up a server with a configuration manager.
    – jasonwryan
    30 mins ago










  • @jasonwryan it is extremely important for me to ask you if you will say the same for openSUSE, Alpine or any other "fully rolling release" distro?
    – JohnDoea
    16 mins ago










  • I know nothing about how those other distros work, but I imagine that the same would apply. They have their own package managers and naming conventions.
    – jasonwryan
    8 mins ago










  • I see. Well, seems like staying with latest Debian stable and a good-written Ansible playbook will the stablest I could get for say 15-20 years. After all, who knows what technologies will be available then; maybe by then PaaS services will be much cheaper (also 5 USD per machine like a cheap IaaS or maybe IaaS machines will have much better automation solutions than available now by 2018).
    – JohnDoea
    3 mins ago


















  • No, because the package names are different on Arch, as are the commands for pacman.
    – jasonwryan
    32 mins ago










  • Also, if you have never used Arch before, it is a terrible idea to think you can set up a server with a configuration manager.
    – jasonwryan
    30 mins ago










  • @jasonwryan it is extremely important for me to ask you if you will say the same for openSUSE, Alpine or any other "fully rolling release" distro?
    – JohnDoea
    16 mins ago










  • I know nothing about how those other distros work, but I imagine that the same would apply. They have their own package managers and naming conventions.
    – jasonwryan
    8 mins ago










  • I see. Well, seems like staying with latest Debian stable and a good-written Ansible playbook will the stablest I could get for say 15-20 years. After all, who knows what technologies will be available then; maybe by then PaaS services will be much cheaper (also 5 USD per machine like a cheap IaaS or maybe IaaS machines will have much better automation solutions than available now by 2018).
    – JohnDoea
    3 mins ago
















No, because the package names are different on Arch, as are the commands for pacman.
– jasonwryan
32 mins ago




No, because the package names are different on Arch, as are the commands for pacman.
– jasonwryan
32 mins ago












Also, if you have never used Arch before, it is a terrible idea to think you can set up a server with a configuration manager.
– jasonwryan
30 mins ago




Also, if you have never used Arch before, it is a terrible idea to think you can set up a server with a configuration manager.
– jasonwryan
30 mins ago












@jasonwryan it is extremely important for me to ask you if you will say the same for openSUSE, Alpine or any other "fully rolling release" distro?
– JohnDoea
16 mins ago




@jasonwryan it is extremely important for me to ask you if you will say the same for openSUSE, Alpine or any other "fully rolling release" distro?
– JohnDoea
16 mins ago












I know nothing about how those other distros work, but I imagine that the same would apply. They have their own package managers and naming conventions.
– jasonwryan
8 mins ago




I know nothing about how those other distros work, but I imagine that the same would apply. They have their own package managers and naming conventions.
– jasonwryan
8 mins ago












I see. Well, seems like staying with latest Debian stable and a good-written Ansible playbook will the stablest I could get for say 15-20 years. After all, who knows what technologies will be available then; maybe by then PaaS services will be much cheaper (also 5 USD per machine like a cheap IaaS or maybe IaaS machines will have much better automation solutions than available now by 2018).
– JohnDoea
3 mins ago




I see. Well, seems like staying with latest Debian stable and a good-written Ansible playbook will the stablest I could get for say 15-20 years. After all, who knows what technologies will be available then; maybe by then PaaS services will be much cheaper (also 5 USD per machine like a cheap IaaS or maybe IaaS machines will have much better automation solutions than available now by 2018).
– JohnDoea
3 mins ago















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f490947%2ftranslating-a-server-environment-debian-apt-ansible-playbook-to-an-arch-linux-on%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f490947%2ftranslating-a-server-environment-debian-apt-ansible-playbook-to-an-arch-linux-on%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

サソリ

広島県道265号伴広島線

Setup Asymptote in Texstudio